Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 1
    Array Variable! That is what I was looking for. This helped greatly, thank you! As I have multiple arrays specified, I didn't need to use the wildcard. Also, its an older version of AIX ( yay corporate red tape) so I used single quotes as opposed to the parens. Got it working. Commented Jan 8, 2016 at 6:44
  • 1
    Actually it should be "${DIRLIST[@]}". If you don't quote the variable, then word splitting will be performed on the array values. Commented Jan 8, 2016 at 8:26
  • 1
    @Simply With quotes around the value and spaces between values, you aren't defining an array, you're defining a string variable. If you then use an unquoted expansion (find $DIRLIST), which is the “glob+split” operator, that works for you, provided the directory names don't contain spaces or \[*?. Commented Jan 8, 2016 at 23:17