Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: read & leading (and trailing) spaces
- X-seq: zsh-users 14110
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: read & leading (and trailing) spaces
- Date: Tue, 12 May 2009 08:14:01 -0700
- In-reply-to: <20090512080635.23199.qmail@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20090512074013.66710.qmail@xxxxxxxxxxx> <20090512080635.23199.qmail@xxxxxxxxxxx>
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