Iuri Guilherme dos Santos Martins wrote:
When dealing with paths in bash i usually employ two things:

One is declaring arrays like this:

FILES_LIST=( )

And everytime I want to append to the array I go like this:

FILES_LIST=( ${FILES_LIST[@]} ${NEW_FILE} )

Obviously I will have problems if the paths or files have spaces in their names, ...

Does this work?

 FILES_LIST=( "${FILES_LIST[@]}" "${NEW_FILE}" )

(Read the part of the bash manual page that describes how ...[*]
and ...[@] act when inside double-quoted strings.)


Daniel


--
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/4f95fb6b.8020...@kempt.net

Reply via email to