Write a menu driven script to convert the content of file in to uppercase or lowercase based on user choice

echo "enter string "

read name

echo "convert string into uppercase press 1"

echo "convert string into lowercase press 2"

read a

case $a in

1)

echo $name | tr "[a-z]" "[A-Z]"

;;

2)

echo $name | tr "[A-Z]" "[a-z]"

;;

esac


Post a Comment

If you have any doubts, Please let me know
Thanks!

Previous Post Next Post