Write a shell script to convert a file to lower case or upper case as specified by user.
clear echo "Menu " echo "1. Lower to Upper" echo "2. Upper to lower " echo "3. Quit" echo "Enter ur Choice \c" read Choice case"$Choice"in 1) echo "Enter File: \c" read f1 if [ -f $f1 ] then echo "Converting Lower Case to Upper Case " tr '[a-z]''[A-Z]' <$f1 else echo "$f1 does not exist" fi ;; 2) echo "Enter the File :\c" read f1 if [ -f $f1 ] then echo "Converting Upper case to Lower Case to " tr '[A-Z]''[a-z]' <$f1 else echo "$f1 file does not exist " fi ;; 3|*) echo "Exit......." exit;; esac -------------------------------------------------------------------------------- output: $ cat >HELLO HOW R U .... NICE MEETING U. BYE $ SH36 Menu 1. Lower to Upper 2. Upper to lower 3. Quit Enter ur Choice 2 Enter the File :HELLO Converting Upper case to Lower Case to how r u .... nice meeting u. bye $ SH36 Menu 1. Lower to Upper 2. Upper to lower 3. Quit Enter ur Choice 1 Enter the File :hell Converting Lower Case to Upper Case XCMSD CGF G DF DFD GHG