zsh-users
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Marc Chantreux <eiro@phear.org>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: zsh poor performances while reading and testing ?
Date: Fri, 5 Jul 2019 15:44:55 +0200	[thread overview]
Message-ID: <CAHYJk3TNQrLnrV7TctGvj1cwSNP537nepBBVWgOwWZzmaXCJFA@mail.gmail.com> (raw)
In-Reply-To: <20190705132842.GA21074@prometheus.u-strasbg.fr>

On 7/5/19, Marc Chantreux <eiro@phear.org> 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

  parent reply	other threads:[~2019-07-05 13:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190703135824.GA19289__20170.6622539618$1562162400$gmane$org@prometheus.u-strasbg.fr>
2019-07-03 14:28 ` Stephane Chazelas
2019-07-05 13:28   ` Marc Chantreux
2019-07-05 13:44     ` Peter Stephenson
2019-07-05 14:21       ` Marc Chantreux
2019-07-05 14:29         ` Peter Stephenson
2019-07-05 15:53           ` Marc Chantreux
2019-07-05 13:44     ` Mikael Magnusson [this message]
     [not found]   ` <20190705132842.GA21074__38577.2207098611$1562333415$gmane$org@prometheus.u-strasbg.fr>
2019-07-05 18:05     ` Stephane Chazelas
2019-07-03 13:58 Marc Chantreux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHYJk3TNQrLnrV7TctGvj1cwSNP537nepBBVWgOwWZzmaXCJFA@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=eiro@phear.org \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).