ThomasDickey / original-mawk

bug-reports for mawk (originally on GoogleCode)
http://invisible-island.net/mawk/mawk.html
17 stars 2 forks source link

Last field in record not printed #39

Open thorstenkampe opened 8 years ago

thorstenkampe commented 8 years ago

Mawk 1.3.4 20131226 (Cygwin)

mawk '{printf "%s %s\n", $2, $1}' TEST.txt
 A1
 B1

The next statement shows correct output and content of TEXT.txt:

mawk '{printf "%s %s\n", $1, $2}' TEST.txt
A1 A2
B1 B2

This happens only with Windows line endings. Gawk doesn't have the problem:

gawk '{printf "%s %s\n", $2, $1}' TEST.txt
A2 A1
B2 B1