Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: read & leading (and trailing) spaces



On May 12,  8:06pm, Atom Smasher wrote:
}
} it looks like i can also set IFS='\n'. that makes three work-arounds. of 
} the three, is one best? should any be avoided?

If you set IFS='\n' you'll find your input is broken into words on the
characters backslash and n.  Try it with "read -A" or when providing
the name of more than one variable to read into.

I'd recommend IFS=$'\n' if you don't like IFS=''.



Messages sorted by: Reverse Date, Date, Thread, Author