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

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



В Вск, 26.05.2002, в 01:45, Thiago F.G. Albuquerque написал:
> 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.
> 

Impossible (unless you either unset it yourself or have very broken
version). (Value of) IFS is used to split input line into words in some
contexts; I am sure about `read' builtin and possibly some others
(select?). By default it is set to space, TAB and LF for sure; I am not
sure if \0 is Zsh extension (anybody cares to lookup in SUS?)

> I unset IFS in zsh and "set|grep" worked again.
> Using "grep -a" also works.
> 
> Is it ok if I remove \0 from IFS?
> 

Zsh itself does not depend on its value. But you may have some scripts
that expect it to contain \0. 

-andrej



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