[mdlug] Need help with bash array usage

Jeff Hanson jhansonxi at gmail.com
Tue Jul 8 21:45:13 EDT 2008


Sample script and directories attached.  I'm trying to find files with
a specific filename extension, containing a specific string, in a
directory tree where directory and file names may contain spaces, then
put it into an array with one complete path per element.  I can obtain
a list with quoted paths and use command substitution to load it into
the array but the assignment ignores the quotes and each element gets
a space-delimited substring.  I think it's a word-splitting problem
but am not sure how to fix it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arraytest.tar.bz2
Type: application/x-bzip2
Size: 540 bytes
Desc: not available
URL: <http://mdlug.org/pipermail/mdlug/attachments/20080708/5e6247eb/attachment-0001.bz2>


More information about the mdlug mailing list