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: IFS not fixing carriage returns


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@gnu.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


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