Executing a command on every file in a directory
I would like to automate my command-line operations a little...
I have a command that asks for a file at stdin as such: command (lots of arguments) < file But I have to do this for every file in the directory. Since wildcards are obviously not allowed: command (lots of arguments) < * Is there an easy way to accomplish this? |
Maybe something like this:
Code:
for i in *; do command < $i; done |
Yep! That worked!!
Thanks |
All times are GMT -5. The time now is 05:46 PM. |