| delorie.com/archives/browse.cgi | search |
| X-Spam-Check-By: | sourceware.org |
| Message-ID: | <45BEB4C5.8030508@huarp.harvard.edu> |
| Date: | Mon, 29 Jan 2007 22:00:21 -0500 |
| From: | Norton Allen <allen AT huarp DOT harvard DOT edu> |
| User-Agent: | Mozilla Thunderbird 1.0.6 (Windows/20050716) |
| MIME-Version: | 1.0 |
| To: | cygwin list <cygwin AT cygwin DOT com> |
| CC: | Eric Blake <ebb9 AT byu DOT net> |
| Subject: | bug with cat and backticks? (was: bug with built-in ...) |
| Received-SPF: | pass (ent.arp.harvard.edu: 24.61.82.50 is authenticated by a trusted mechanism) |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
> > >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 >> >> PID=`cat $PIDFILE` > >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. >http://cygwin.com/ml/cygwin-announce/2007-01/msg00015.html > <http://cygwin.com/ml/cygwin-announce/2007-01/msg00015.html> > No, this is a text mount: Cygwin> mount [cut] d:\Data on /Data type user (textmode) [cut] 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'" 'hello Cygwin> 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. -Norton -- 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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |