This is the mail archive of the
mailing list for the Cygwin project.
Re: IFS not fixing carriage returns
- 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
- Subject: Re: IFS not fixing carriage returns
- References: <Pine.NEB.firstname.lastname@example.org>
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
> (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
> 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.)
email@example.com 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
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple