Im trying to make a menu driven shell script and ive hit a brick wall please help
Hi all ive managed to get the following script to work in opensuse using linux.
#!/bin/bash
# Menu
while [ answer != "0" ]
do
clear
echo “Main menu”
echo "Select from the following functions"
echo "0 exit"
echo "1. Set File Directory"
echo "2. Text File Management"
read -p " ?" answer
case $answer in
0) break ;;
1) echo "Go up a directory"
echo “Go into a directory”
echo “Set working directory” ;;
2) echo “List (.txt) files”
echo “Create File”
echo “ Delete File” ;;
*) break ;;
esac
echo "press RETURN for menu"
read key
done
exit 0
That script works fine but i cant figure out for the life of me how to actually make it so that the user can then go up a directory, go into a directory, list txt files etc... via the menu script i am trying to create. Any suggestions? thanks all
|