chikn
10-04-2001, 06:25 PM
Benn playing around making a menu script or trying rather. Below is a test script I wrote to see if it would work with linux. This is the way I do it at work for the SCO OpenServer and it works fine, but it doesnt seem to work for linux. If I completely remove from 2) to the exit line the the first option will work. If I leave it as is I get:
line 21: syntax error near unexpected token '2)'
line 21: syntax error '2) echo Run Linuxconf'
stty erase ^H
choice=Z
while test $choice != 'e' || $choice != 'E'
do
clear
echo "
What do you want to do:
1. Start an X Windows Session
2. Run Linuxconf
e. Exit to Terminal
Please select an option:"
read choice
if test $choice
then
case $choice in
1) echo Starting X......
/usr/bin/X11/startx
2) echo Run Linuxconf
/bin/linuxconf
'e'|'E') exit;;
esac
else
choice=Z
fi
done
Problem number 2:
Mandrake doesnt seem to use the usual .profile file Im used to. It has a .bash_profile. When I put
exec <menuname>
in it it will run the menu script but in a continual flashing loop like fashion which requires a PID kill to stop.
line 21: syntax error near unexpected token '2)'
line 21: syntax error '2) echo Run Linuxconf'
stty erase ^H
choice=Z
while test $choice != 'e' || $choice != 'E'
do
clear
echo "
What do you want to do:
1. Start an X Windows Session
2. Run Linuxconf
e. Exit to Terminal
Please select an option:"
read choice
if test $choice
then
case $choice in
1) echo Starting X......
/usr/bin/X11/startx
2) echo Run Linuxconf
/bin/linuxconf
'e'|'E') exit;;
esac
else
choice=Z
fi
done
Problem number 2:
Mandrake doesnt seem to use the usual .profile file Im used to. It has a .bash_profile. When I put
exec <menuname>
in it it will run the menu script but in a continual flashing loop like fashion which requires a PID kill to stop.