Hi!
I am having a little problem with a menu driven administration script. The part I am working on right now is for downloading and uploading configuration files to other hosts, but it is not the up- and downloading that is the problem. It is the menu:
echo -n "Hvor skal den nye konfigurasjonen brukes [(s)amme,(g)ruppe,(e)nkel]: "
read where
case $where in
[Ss])
./upconfig $1 $ip $pass;;
[Gg])
echo
while ls -l ./ipgroups | more
echo -n "Hvilken gruppe [blank for ny liste]: "
read gruppe
if [ -x ./ipgroups/$gruppe ]; then
for host in ./ipgroups/$gruppe
do
./upconfig $1 $host $pass
done
else
:; fi;; <-- Line 107....
[Ee])
echo
echo -n "Skriv inn IP-adressen: "
read ip
./upconfig $1 $ip $pass;;
esac
This is a small part of the script where the user is prompted about where to upload the configuration files. The [Gg]-case allows for uploading to a list of IPs contained in a file.
However the script refuses to fun with this error message:
./admin: line 107: syntax error near unexpected token `;;'
./admin: line 107: ` :; fi;;'
I am pretty sure the problem lies in the if-then and for-in above line 107, but I am way to newb to spot the problem.
Can someone help me please?