[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Question about "Depends: bash"



* Oleg Verych 

| o `arrays'  bashizm -> tmp=$@ ; set -- $ARRAY ; use_array $@ ; set -- $tmp

This is in no way equivalent (with dash):

\u@\h:\w$ set -- "abcd efg" "hij"
\u@\h:\w$ echo $@
abcd efg hij
\u@\h:\w$ echo $1
abcd efg
\u@\h:\w$ tmp="$@"
\u@\h:\w$ set -- blah
\u@\h:\w$ set -- $tmp
\u@\h:\w$ echo $1
abcd
\u@\h:\w$

If you need arrays, use bash or a proper programming language.

-- 
Tollef Fog Heen                                                        ,''`.
UNIX is user friendly, it's just picky about who its friends are      : :' :
                                                                      `. `' 
                                                                        `-  



Reply to: