I have the following script which works great if the user types both arguments in all lower case. If the user of the script types the command with any upper case letters the script will fail. I am sure there must be a way for the user input to be proceed in all lower case.
The 2 arguments in my script are: ${CONTEXT} and ${MACADD}
#!/bin/bash
#
if [ -z ${2} ]
then
echo "usage: $0 <contextname> <macaddress>"
exit 1
fi
CONTEXT=${1} | tr '[A-Z]' '[a-z]'
MACADD=${2} | tr '[A-Z]' '[a-z]'
cat /var/softswitch/configs/de