Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- i=1
- echo "This is a menu Driven Program to Perform Variation file Operation"
- echo "1. List All The Files"
- echo "2. Create And Read File"
- echo "3. Make Directory"
- echo "4. Change Directory"
- echo "5. Delete Directory"
- echo "6. Present Working Directory"
- echo "7. Exit"
- while [ $i -eq 1 ]
- do
- echo "Enter Your Chose"
- read ch
- case $ch in
- 1) echo "List All The Files"
- ls
- ;;
- 2) echo "Enter the Create And Read File"
- read filename
- gedit $filename
- cat $filename
- ;;
- 3) echo "Enter the Make Directory"
- read dirnm
- mkdir $dirnm
- ls -l
- ;;
- 4) echo "Enter the Change Directory"
- read chdir
- cd $chdir
- pwd
- cd
- ;;
- 5) echo "Delete Directory"
- read dirnm
- rm -i -r $dirnm
- ;;
- 6) echo "This is Present Working Directory"
- pwd
- ;;
- 7) echo "Exit"
- exit
- ;;
- *) echo "Enter Proper Choice"
- ;;
- esac
- echo "Enter Your Choice Of You Want To Continue"
- read i
- if [ $i -ne 1 ]
- then
- exit
- fi
- done
Add Comment
Please, Sign In to add comment