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

read & leading (and trailing) spaces



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