sed and Mac OS X differences with to upper, to lower and whole capture control sequences
OSX (BSD) sed doesn't support functions \L
, \E
etc. Install gnu sed
on Mac using this option:
brew install gnu-sed
awk
alternative:
ls | awk '{print $0 tolower(substr($0,length($0)-1,2))}'