I am using IFS to parse out a line in sh (actually, bash under Linux).
I have something like:
foo=`IFS=/;set -- /foo/bar/bletch/some/filename;echo $5`
However, it doesn't work. After the first 'set', everything is in $1, not
in the other args (although it does convert the slashes into spaces).
To get what I really want, I have to do:
foo=`IFS=/;set -- /foo/bar/bletch/some/filename;set -- $1;echo $5`
This correctly gets me 'some' (Note that $1 is null).
But why do I need the additional 'set' command? Is this WAD (*) ?
It seems to me that the first form ought to work.
(*) Working as designed.
************************************************************************
Are you joking? DOS applications in WinNT? WinNT is just a toy
you install on your machine, to give more shine to OS/2's glory.
- Mikael Wahlgren -
hundreds, if not thousands, of dollars, every time he posts -
************************************************************************
rwvpf wpnrrj ibf ijrfer