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

Re: zsh poor performances while reading and testing ?



On Fri, 2019-07-05 at 15:28 +0200, Marc Chantreux wrote: 
> > You'll probably find that they are all as inefficient for
> > non-seekable non-peekable input like pipes.
> actually my point making this bench was: don't use shell to write
> serious filters. however i really appreciate knowing why this difference
> exists. thanks a lot.
> 
> > 
> > IFS= read -r line
> ok for -r but as long as i use only one variable, why is it important to
> use IFS= ?

As Look and Learn magazine used to say, Find Out By Doing.


% read -r line
  full line  
           ^^ spaces here
% print -r -- "'$line'"
'  full line  '
% read -r line
  full line  
           ^^ spaces here
% print -r -- "'$line'"
'full line'


pws



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