On 2006-11-22, Tollef Fog Heen wrote: > * Oleg Verych > >| o `arrays' bashizm -> tmp=$@ ; set -- $ARRAY ; use_array $@ ; set -- $tmp > > This is in no way equivalent (with dash): > > [EMAIL PROTECTED]:\w$ set -- "abcd efg" "hij" > [EMAIL PROTECTED]:\w$ echo $@ > abcd efg hij > [EMAIL PROTECTED]:\w$ echo $1 > abcd efg > [EMAIL PROTECTED]:\w$ tmp="$@" > [EMAIL PROTECTED]:\w$ set -- blah > [EMAIL PROTECTED]:\w$ set -- $tmp > [EMAIL PROTECTED]:\w$ echo $1 > abcd > [EMAIL PROTECTED]:\w$ > > If you need arrays, use bash or a proper programming language.
Guys. Once more. Spaces is your problem, not my. In case of spaces in file names, what isn't such a synthetic test case, i would use temp. file with them, and would read it by lines. Array means you have some kind of index or iterator, i think, it's ok with temp. file and ok 2 times if you deal with files. Real problem is different 'set --' implementations. In bash it honors IFS in dash it doesn't. Both don't honor quotes for pathname expansions (as i've mentioned, -f helps). busybox has its own "set --". As big thread about POSIX shell shows, one must have a real documetation to implement features. BaSH's man page doesn't have clear line between "shiny-features" and "a must" for bourne shell. Many bashizms are right from there. As all this GFDL ... thing shows who is right, i will work towards "Debian Viva, GNU R.I.P.", as development and answer to my footer. -- -o--=O`C info emacs : not found /. .\ ( is there any reason to live? ) #oo'L O info make : not found o (R.I.P. Debian Operating System) <___=E M man gcc : not found .-- ( TNX, RMS. ) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]