uppercase to lowercase in bash on a mac
- by Mala
Hi
I'm writing a bash script which needs to convert a string to lowercase. The problem is I'm doing it on a mac so 'tr' is not available. How can I go about doing this on a mac?
The problem I'm trying to tackle is that my script needs to recognize an if an extension is a .gif or a .jpg - and I don't want to have to check for .jpeg, .jPeg, .JPEG, .JPeg, etc etc etc... if there's a smarter way of doing this than just converting to lowercase and testing for gif, jpg and jpeg, i'm all ears :)