Soare Catalin <lolinux.so...@gmail.com> writes:

>Thank you everyone for replying, but unfortunately, nothing seems to work
>for the moment, although all the answers appear to make sense.
>First, the array solution appears to work, but when tar gets all the
>parameters, they become a long string without spaces :), obviously "cannot
>stat: No such file or directory".

Please post the code you have ended up with. The array method I posted
will work, but you may be using it incorrectly. From the bash man page:

     If the word is double-quoted, ${name[*]} expands to a single word
     with the value of each array member separated by the first character
     of the IFS special variable, and ${name[@]} expands each element of
     name to a separate word.

That is, the literal "${name[@]}" expands to each element of the array
"name" as a separate word. Not one long word as you have experienced.

I've used this method plenty of times in the past, so I know it does work.
What version of bash are you using? (bash --version)


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/7c06.4f95ff7c.e7...@xionine.xdna.net

Reply via email to