This is the mail archive of the
mailing list for the Cygwin project.
Join command fails to output fields on input file with DOS line endings.
- From: "Andy Hall" <fixpertise-consulting at comcast dot net>
- To: <cygwin at cygwin dot com>
- Date: Mon, 22 Jul 2019 12:50:46 -0700
- Subject: Join command fails to output fields on input file with DOS line endings.
This behavior of join surprised me:
$ join -1 3 <(echo a b col3 c d | unix2dos) <(echo col3 f2 f3 f4 f5)
f2 f3 f4 f5
Join parses the input line well enough to execute the join, but the presence of the DOS line endings suppresses the
output of fields from the first input.
$ join -1 3 <(echo a b col3 c d) <(echo col3 f2 f3 f4 f5)
col3 a b c d f2 f3 f4 f5
which is correct.
Here is a weirder example where the join field is missing and the output is reversed!
$ join <(echo col F1 | unix2dos) <(echo col F2)
$ join <(echo col F1) <(echo col F2)
col F1 F2
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple