My colleague, Ryan, came to me with a bug in his Bash script, and I identified the problem with this test:
$ mkdir ryan $ mkdir ryan/smells-bad $ FOO=ryan/sm
Consider
for dir in $FOO; do touch "$dir/rotten_eggs" done
Note that this will touch multiple files if the glob pattern matches more than one pathname.
touch