Menu based script to perform below operations on file and directory. Display current directory List directory Make directory Change directory Copy a file Rename a file Delete a file Edit a file
echo " 1...Display current Directory" echo " 2...List Directory" echo " 3...Make directory " echo " 4...Change directory " echo " 5...Copy a file " echo " 6...Rename a fIle " echo " 7...Delete a file " echo " 8...Edit a file " echo " Enter Your Choice: " read ch case $ch in 1) pwd ;; 2) ls ;; 3) echo Enter directory name to make read dir_name mkdir $dir_name ;; 4) cd ;; 5) echo Enter two file name to copy read f_name1 f_name2 cp $f_name1 $f_name2 ;; 6) echo Enter file name to rename read fname mv $fname ;; 7) echo Enter file name to delete read fname rm $fname ;; 8) echo Enter file name to edit read fname vi $fname ;; *) echo You hv entered wrong choice ;;