troubleshooting Question

Linux bash script to change argument to lowercase

Avatar of ipconfig610
ipconfig610Flag for United States of America asked on
Linux OS Dev
3 Comments1 Solution548 ViewsLast Modified:
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}


if [ -z ${2} ]
    echo "usage: $0 <contextname> <macaddress>"
    exit 1
cat /var/softswitch/configs/device/polycom/${CONTEXT}/${MACADD}-boot.log

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros