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

Re: FW: About word splitting in read (Zsh)



On Aug 1,  9:40am, Andrej Borsenkow wrote:
} Subject: FW: About word splitting in read (Zsh)
}
} In (almost latest) CVS:
} 
} bor@itsrm2% read -r foo
}    qwert   yuiop   !
} bor@itsrm2% print -r $foo
} qwert   yuiop   !
} 
} So, the question is - should we fix -r or introduce new option?

Neither.

zagzig[271] IFS=$'\n' read -r line <<<'   this has   many   spaces   ' 
zagzig[272] echo %$line%
%   this has   many   spaces   %

On Aug 1, 10:49am, Andrej Borsenkow wrote:
} 
} And trailing spaces as well.

Uh-huh.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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