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]

bug with cat and backticks? (was: bug with built-in ...)

According to Norton Allen on 1/28/2007 1:08 PM:
I'm wondering if the problem I am seeing is from the same source. I find
that 'apachectl stop' no longer works since a recent cygwin update. I
can see that the PIDFILE is being written with a \r\n line ending.
'apachectl stop' then reads the file with


cat is not a bash builtin, so no this is not the same problem. Are you running a script with CRLF line endings on a binary mount? If so, read the announcment, and use d2u on your script. <>

No, this is a text mount:

Cygwin> mount
d:\Data on /Data type user (textmode)
Cygwin> cd /Data
Cygwin> echo hello >test.txt
Cygwin> xxd test.txt
0000000: 6865 6c6c 6f0d 0a                        hello..
Cygwin> foo=`cat test.txt`
Cygwin> echo "'$foo'"

Note the trailing quote is missing because of in intervening CR. It seems that the discussion of confusion about whether a program should be in text mode or binary mode when pipes are involved would still be relevant here.


-- Unsubscribe info: Problem reports: Documentation: FAQ:

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