It will only accept one argument where it should be upper or lowercase. if user choose to convert filnames to upper case than it should convert to upper or vice versa. if no action taken by the user then should not do anything
if test $# -ne 1
then
echo "wrong number of args: $0 flags[-l][-u] "
return
fi
if test $1 = "-l"
then
tr "[A-Z]" "[a-z]" < file1
elif test $1 = "-u"
then
tr "[a-z]" "[A-Z]" < file1
else
echo "wrong options: [-l][-u]"
fi
If you want to ensure arguments past into your program are in the correct case, you should use typeset -u to convert to uppercase and typeset -l to convert to all lowercase.