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

Re: [Newbie] 'set|grep' doesn't work as expected



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.

Perhaps: export foo="$(print '\efred')"

It could be that you've even inherited a key=value pair where the key is
the problem.  But zsh itself won't let you set such.

Perhaps you have UTF or ISO 8859 data in a string and your grep doesn't
know about the local.

If your grep supports the "-a" option, to force interpretation as ASCII,
perhaps you could try that.

Or track down _why_ you have strange values in your environment.


If this is at all related to your use of zsh vs bash, then you've put
binary data into the environment in one of your zsh startup files.
-- 
I just felt a great disturbance in the net, as if millions of packets
suddenly cried out in terror, and were suddenly discarded. -- amt

Attachment: pgpHaKCQdi867.pgp
Description: PGP signature



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