Browser_ice
June 18th, 2008, 09:47 PM
I am rusty in shell scripting and I have started scripting in my Ubuntu 7.10
I am at a dead stop on one stupid error which I admit I cannot figure out.
My script is summarized as :
#!/bin/sh
CHOICE=""
...
while &CHOICE" != "0" then
do
clear
echo "menu"
echo "1) choice 1"
echo "2) choice 1"
read CHOICE
case "&CHOICE" in
1)
echo "bla bla bla"
echo "Are you sure (y/n)?"
read ANSWER
if "&ANSWER"="y"; then
...
fi;;
...
0) echo "Good bye!";;
esac
done
exit
no matter how I code the while condition, it keeps bombinb out from the start saying it cannot find &CHOICE and always points to the last line of code where my done for the while is.
The while loop only contains a case cmd and all the case subsection are usign the same format.
I tried using (), [], <>, != in combinations with "while condition; then" and "while condition then"
I am at a dead stop on one stupid error which I admit I cannot figure out.
My script is summarized as :
#!/bin/sh
CHOICE=""
...
while &CHOICE" != "0" then
do
clear
echo "menu"
echo "1) choice 1"
echo "2) choice 1"
read CHOICE
case "&CHOICE" in
1)
echo "bla bla bla"
echo "Are you sure (y/n)?"
read ANSWER
if "&ANSWER"="y"; then
...
fi;;
...
0) echo "Good bye!";;
esac
done
exit
no matter how I code the while condition, it keeps bombinb out from the start saying it cannot find &CHOICE and always points to the last line of code where my done for the while is.
The while loop only contains a case cmd and all the case subsection are usign the same format.
I tried using (), [], <>, != in combinations with "while condition; then" and "while condition then"