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

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



Preben Peppe Guldberg wrote:

Således berettede Phil Pennock (Phil.Pennock@xxxxxxxxxxx) 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



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