What does IFS="${IFS}[]()" mean?

What does IFS="${IFS}[]()" mean?

Post by todeepaksa » Sat, 02 Sep 2006 18:00:51


Hi,
I have a ksh script as below.
jobs -l | while IFS="${IFS}[]()" read ...

I know IFS is for Field Separator;
However I can't understand what does IFS="${IFS}[]()" mean???

Can Anybody help me on above?

~Deepak
 
 
 

What does IFS="${IFS}[]()" mean?

Post by Stachu 'Do » Sat, 02 Sep 2006 18:58:18


Append some characters to IFS.

--
<Kosma> Niektzy lubi?dozziego...
<Kosma> Oczywiie szanujemy ich.
Stanislaw Klekot

 
 
 

What does IFS="${IFS}[]()" mean?

Post by Deepa » Sat, 02 Sep 2006 19:09:22

Thanks for the reply,
However I want to know what is the significance of []() in
IFS="${IFS}[]()"
Can you please explain on this?
 
 
 

What does IFS="${IFS}[]()" mean?

Post by Stachu 'Do » Sat, 02 Sep 2006 19:20:36


That's the characters appended to $IFS. Couldn't you simply do
` echo "${IFS}[]()" '?

And don't toppost.





--
<Kosma> Niektzy lubi?dozziego...
<Kosma> Oczywiie szanujemy ich.
Stanislaw Klekot
 
 
 

What does IFS="${IFS}[]()" mean?

Post by Barry Marg » Sat, 02 Sep 2006 19:40:43

In article < XXXX@XXXXX.COM >,



It adds the characters [, ], (, and ) to IFS. So these characters will
be field separators, in addition to whatever is already in IFS. This is
presumably done in advance of reading from a file that uses brackets and
parentheses as separators.

--
Barry Margolin, XXXX@XXXXX.COM
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***