Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
read & leading (and trailing) spaces
- X-seq: zsh-users 14107
- From: Atom Smasher <atom@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: read & leading (and trailing) spaces
- Date: Tue, 12 May 2009 19:40:08 +1200 (NZST)
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Openpgp: id=0xB88D52E4D9F57808; algo=1 (RSA); size=4096; url=http://atom.smasher.org/pgp.txt
this doesn't work as advertised when the input includes leading and/or
trailing spaces:
read -r foo ; print -r -- "${foo}"
i can work around that by setting IFS to either null (IFS='') or setting
it to just a newline (IFS='
'). should i expect problems (in older or newer versions of zsh) using
either of those tricks to make read recognize leading/trailing spaces?
thanks...
--
...atom
________________________
http://atom.smasher.org/
762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
-------------------------------------------------
"As a cryptography and computer security expert,
I have never understood the current fuss about
the open source software movement. In the
cryptography world, we consider open source
necessary for good security; we have for decades.
Public security is always more secure than
proprietary security. It's true for cryptographic
algorithms, security protocols, and security
source code. For us, open source isn't just a
business model; it's smart engineering practice."
-- Bruce Schneier, 15 Sep 1999
Messages sorted by:
Reverse Date,
Date,
Thread,
Author