A dumb CR/LF question

Dan Haynes haynes@anchorgaming.com
Sat Oct 7 08:57:00 GMT 2000


I feel really dumb having to ask this - I searched the archives and FAQ,
read a ton of posts about line endings but didn't find anything specifically
related to what I'm seeing. I may have just missed it because of the sheer
number of posts to look through. I *thought* I was pretty aware of all the
differences/issues with line endings and how they are affected by mount
types, but I'm confused by this one.

I'm using 1.1.4 now, just upgraded from B20.1 which I've been using for a
good long while. I did a fresh install from the net about a week ago, using
all defaults. Now I do a:

cat ./build/f1 ./build/f2 | sort >/tmp/f3

Passing the output through some utiltities like 'sort' causes line endings
to be expanded to CR CR LF (two carriage returns and a line feed)

All mounts (both Cygwin created and the ones I have created) are textmode. I
triple checked path and such and all the executables are coming from
/usr/bin.

If I do:

 cat ./build/f1 ./build/f2 >/tmp/f3

...the file is created properly with CR LF endings. It's only if I pipe it
through or process it with some tools (sort, uniq, awk) that it acquires the
extra CR. If I pipe it through grep, egrep, or expand it gets the expected
CR LF endings.

I tried updating to the 9/29 snapshot cygwin1.dll file, but it still does
the same thing.

Anyone care ta put a quarter in the clue meter for a dummy? :-p A link would
be most appreciated. :-)

Thanks,

  Dan








--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list