KrazyPenguin
June 21st, 2007, 12:09 AM
Here is a simple menu script but how do I get rid of the space
between Start and Backup?
Obviously I am getting three options listed instead of two:
Start
Backup
Quit
OPTIONS="Start Backup Quit"
select opt in $OPTIONS; do
if [ "$opt" = "Start Backup" ]; then
echo "start backup"
exit
elif [ "$opt" = "Quit" ]; then
echo done
else
clear
echo bad option
fi
done
But I want Start Backup to be one option.
I am new to this and learning a little here and a little there.
I search google but couldn't find the answer.
Thanks.
between Start and Backup?
Obviously I am getting three options listed instead of two:
Start
Backup
Quit
OPTIONS="Start Backup Quit"
select opt in $OPTIONS; do
if [ "$opt" = "Start Backup" ]; then
echo "start backup"
exit
elif [ "$opt" = "Quit" ]; then
echo done
else
clear
echo bad option
fi
done
But I want Start Backup to be one option.
I am new to this and learning a little here and a little there.
I search google but couldn't find the answer.
Thanks.