This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU Awk 4.0.1: Cygwin's awk is filtering CR from the input


"It seems like the issue is awk specific under Cygwin.  I tried a few
different things and it seems that awk is silently treating replacing
\r\n with \n in the input data."

See stack overflow ticket #24251296
titled: does-awk-cr-lf-handling-break-on-cygwin

Unfortunately the spam filter rejects links to stack overflow (already
a spam filtered site)

On Linux (good, we have cr and nl)
$ echo $'line1\r\nline2'|awk 1|od -a
0000000   l   i   n   e   1  cr  nl   l   i   n   e   2  nl
0000015

On Cygwin or MSYS (bad, we have only a cr)
$ echo $'line1\r\nline2'|awk 1|od -a
0000000   l   i   n   e   1  nl   l   i   n   e   2  nl
0000014

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]