zsh-users
 help / color / mirror / code / Atom feed
From: "Thiago F.G. Albuquerque" <tfga@zaz.com.br>
To: zsh-users@sunsite.dk
Subject: Re: [Newbie] 'set|grep' doesn't work as expected
Date: Sat, 25 May 2002 18:45:09 -0300	[thread overview]
Message-ID: <3CF005E5.9020103@zaz.com.br> (raw)
In-Reply-To: <20020525015934.C19325@master.guldberg.net.invalid>

Preben Peppe Guldberg wrote:

> Således berettede Phil Pennock (Phil.Pennock@globnix.org) den [020525]:
> 
>>On 2002-05-24 at 20:27 -0300, Thiago F. G. Albuquerque wrote:
>>
>>>In bash I can type
>>>
> 
>>>set | grep <something>
>>>
> 
>>>and it's ok.
>>>
> 
>>>In zsh, it gives me the message:
>>>
> 
>>>Binary file (standard input) matches
>>>
> 
>>>Why?
>>>
> 
>>Because you have something in the environment with a non-plaintext
>>representation.
>>
> 
> I think that would be IFS. In bash the default is <space><tab><newline>,
> while zsh add <nul> to these.


You're right. Look:

1 ~> echo $IFS | dump
0000  20  9  A  0  A                                     .....

This is <space>, '\t', '\n' and '\0'. The last "A" is the '\n' printed by echo.

In bash, IFS is set to nothing.

I unset IFS in zsh and "set|grep" worked again.
Using "grep -a" also works.

Is it ok if I remove \0 from IFS?

I would like to thank everybody who replied to my message. Thank you.

Thiago


  parent reply	other threads:[~2002-05-25 21:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-24 23:27 Thiago F.G.Albuquerque
2002-05-25  0:09 ` Phil Pennock
2002-05-24 23:59   ` Preben Peppe Guldberg
2002-05-25  0:47     ` Phil Pennock
2002-05-25  3:19       ` Dan Nelson
2002-05-25 21:45     ` Thiago F.G. Albuquerque [this message]
2002-05-26  6:39       ` Borsenkow Andrej
2002-05-27  5:53         ` Borsenkow Andrej

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=3CF005E5.9020103@zaz.com.br \
    --to=tfga@zaz.com.br \
    --cc=zsh-users@sunsite.dk \
    /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).