Sponsored Links

Maxabout.com > Tips

Running A Command On Multiple Files

Added on:8/22/2008 12:33:46 AM
In Linux Tips
 Rated by 1 users


  1. It is sometime useful to run a command on many files. For example, to convert a series of eps files into jpg format:
    for f in *.eps; do convert $f ${f/%.eps/.jpg}; done

  2. Note that this is only valid if you are interacting with the shell 'Bash'. If you use another shell then you must type 'bash' first.


Sponsored Links
Tools
Bookmark/Discuss