in reply to Run a script on every file in a directory
This is a shell question, but you didn't specify which shell you use. I answered for the two most common shells.
If your script takes multiple file names:
# bash script * # cmd perl -e"@ARGV = glob('*'); do 'script' or die $@||$!"
If you're script takes a single file name:
# bash for q in * ; do script "$q" ; done # cmd for %q in (*) do script "%q"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Run a script on every file in a directory
by afoken (Chancellor) on Jun 08, 2010 at 20:07 UTC | |
by ikegami (Patriarch) on Jun 08, 2010 at 21:15 UTC |