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

Re: zsh poor performances while reading and testing ?



On 7/5/19, Marc Chantreux <eiro@xxxxxxxxx> wrote:
> hello,
>
>> 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= ?

% echo '  hello ' | IFS= read -r one; echo -E - _${one}_
_  hello _
% echo '  hello ' | read -r one; echo -E - _${one}_
_hello_


-- 
Mikael Magnusson



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