Not a duplicate question, as I am asking for awk specifically.
I have the following command to convert everything to lowercase, and then reprint out substrings in a certain order.
cat words |tr '[:upper:]' '[:lower:]' |awk '{ print substr($1,1,1)$2."texttoappend"}'
It works perfectly, but I can't help but think it would be cleaner if I could do it all within awk. Is this possible?
echo FOO bar | awk '{print tolower(substr($1,1,1)$2)}'
works fine for me. – muru Nov 21 '15 at 20:41