Or actually this should print ba according to the awk manual:
eduard@eduard-N150CU:~$ echo "ab"|gawk '{gsub(/(a)(b)/,"\\2\\1"); print}' \2\1
Or actually this should print ba according to the awk manual:
eduard@ eduard- N150CU: ~$ echo "ab"|gawk '{gsub( /(a)(b) /,"\\2\ \1"); print}'
\2\1