Results 1 to 4 of 4
I have returned the below mentioned lines of code however Iam recieving error "Syntax Error On Done Statement".Please check and let me know ASP.Thank
while :
do
clear
echo "-------------------------------------------------------------------"
...
- 11-28-2010 #1Just Joined!
- Join Date
- Nov 2010
- Posts
- 1
Error on dowhile loop error
I have returned the below mentioned lines of code however Iam recieving error "Syntax Error On Done Statement".Please check and let me know ASP.Thank
while :
do
clear
echo "-------------------------------------------------------------------"
echo "Main Menu"
echo "-------------------------------------------------------------------"
echo "[1] Today's Date"
echo "[2] Show files in the current Directory"
read yourch
case $yourch in
1) echo "Today is `date`,press a key ........";read;;
2) echo ls -l;read;;
*) echo "Select the yourch as 1 or 2";
esca
Thanks,
RV
done
- 11-28-2010 #2Should also enclose your code in code tags. It makes it easier to interpret.Code:
esca should be esac
- 11-29-2010 #3Just Joined!
- Join Date
- Nov 2006
- Posts
- 9
new code
Code:while : do clear echo "-------------------------------------------------------------------" echo "Main Menu" echo "-------------------------------------------------------------------" echo "[1] Today's Date" echo "[2] Show files in the current Directory" read yourch case $yourch in 1) echo "Today is `date`,press a key ........";read;; 2) ls -l;read;; *) echo "Select the yourch as 1 or 2"; esac done
This is what you want to do. I changed esca to esac, removed thanks, RV and removed echo in case 2.
- 11-29-2010 #4Just Joined!
- Join Date
- Dec 2006
- Posts
- 3
; done
add
;
done
at end
*) echo "Select the yourch as 1 or 2";;
esac
done
last 3 line looks like above


Reply With Quote