1

Globbing or not globbing

view story
linux-howto

http://www.unix.com – Hi guys, Here is a simple script. It writes the current time to specific files in a directory. The arguments are the names of the files to write the date to (without path nor extension). Code: root:~# cat /usr/local/bin/dummy.sh #!/bin/sh -e for file in $@; do     date >> /var/lib/$file.dat done The command Code: root:~# dummy.sh a1 a2 a3 will write the current time to Code: /var/lib/a1.dat /var/lib/a2.dat /var/lib/a3.dat I'd like to allow wildcards in the arguments. But the command Code: root:~# dummy.sh a* will try to write the current time to files i (HowTos)