rev.awk 74 B

123456
  1. NF == 2 {
  2. printf "%s\t%s\n", $2, $1
  3. }
  4. NF != 2 {
  5. print "ERROR " $0
  6. }