When the following two lines of code are executed in a bash script, \"ls\" complains that the files don\'t exist:
dirs=/content/{dev01,dev02} ls -l $dirs
The issue which no-one has addressed is that the variable assignment makes the difference.
dirs=/content/{dev01,dev02}
expands differently than
echo /content/{dev01,dev02}
The question is how to assign the results of the expansion to dirs
dirs
See: How to use Bash substitution in a variable declaration