| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=-1.2 required=5.0 tests=AWL,BAYES_00 |
| X-Spam-Check-By: | sourceware.org |
| X-ASG-Debug-ID: | 1301088657-2864051d0001-w5GHUG |
| X-Barracuda-Envelope-From: | Illia DOT Bobyr AT ronin-capital DOT com |
| From: | Illia Bobyr <Illia DOT Bobyr AT ronin-capital DOT com> |
| To: | "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com> |
| Date: | Fri, 25 Mar 2011 16:30:34 -0500 |
| X-ASG-Orig-Subj: | Re: IFS not fixing carriage returns |
| Subject: | Re: IFS not fixing carriage returns |
| Message-ID: | <4D8D097A.9020103@ronin-capital.com> |
| References: | <Pine DOT NEB DOT 4 DOT 64 DOT 1103251116331 DOT 6823 AT panix3 DOT panix DOT com> |
| In-Reply-To: | <Pine.NEB.4.64.1103251116331.6823@panix3.panix.com> |
| user-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9 |
| MIME-Version: | 1.0 |
| X-Barracuda-Connect: | UNKNOWN[10.106.240.22] |
| X-Barracuda-Start-Time: | 1301088657 |
| X-Barracuda-Encrypted: | AES128-SHA |
| X-Barracuda-URL: | http://spam01.roncap.com:8000/cgi-mod/mark.cgi |
| 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 |
On 3/25/2011 11:35 AM, Tim McDaniel wrote: > > I have tried Googling for info on this, but there are a lot of false > hits ... > > [...] > > Although it's not documented in "man bash" on the latest Cygwin, I did > find "set -o igncr" and it seems to work well. > > But I'm just curious about why my first attempt didn't work. > > [...] > > Anyone have any ideas on why IFS doesn't work to deal with carriage > returns? > > (Note that adding carriage return to IFS is still an inferior notion > to "set -o igncr". IFSing would effectively put a space at the end of > each line, so I expect that > line arg1 arg2 arg3 \ > arg4 arg5 > would not work. I would also exspect here-documents like > some pipe <<EOF > line1 > line2 > EOF > would need their carriage returns stripped. In contrast, "set -o > igncr" strips carriage returns even in these contexts, so they work > as-is. I'm asking about IFS merely because I'm curious.) > bug-bash AT gnu DOT org might be a better place to ask questions like this. It is essentially a question on how the bash internally works. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |