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]

Re: bug with cat and backticks?


Eric Blake wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Norton Allen on 1/29/2007 8:00 PM:


PID=`cat $PIDFILE`


No, this is a text mount:



That's the answer. You are creating PIDFILE with \r\n line endings, but cat always reads in binary mode.

Try PID=`cat $PIDFILE | d2u` instead. Or try using the igncr shell option.


OK... Note that 'I' am not doing this. This is part of the apachectl script, and sticking | d2u in there isn't a very portable solution. Perhaps I should just adjust mount points so /var/run is a binary mount point.


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


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