what is wrong with this shell script
https://stackoverflow.com/questions/2543313
OTHER TIPS
you should use $()
to assign output to a variable. not ${}
market_l="$(echo $1 | awk '{print tolower($0)}')"
or you can do it with ksh
#!/bin/ksh
typeset -l market_l
market_l="$1"
echo $market_l
Other ways to change case besides awk
, fyi
$ echo "$1"|tr [A-Z] [a-z]
$ echo "$1"|sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow