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б Ершфпщ АюПю Фдигйгукйгу написалЖ
> > 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?)
> 

For the record - neither SUS V2 nor SUS V3 specify default IFS value.
The only statement is, if IFS is not defined shell behaves as if it
contains space, TAB and NL.

-andrej



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