I have a variable:
rules=L002,L003
This rules variable denotes the files to copy from /usr/lib/vera++/scrpts/rules directory. The extension for the files is .tcl.
I am doing something like:
cp -r /usr/lib/vera++/scripts/rules/{${rules}}.tcl .
What goes wrong is that ${rules} is treated completely as a string. But bash should translate that into:
cp -r /usr/lib/vera++/scripts/rules/{L002,L003}.tcl .