How to loop an executable command in the terminal in Linux?

Posted by user1452373 on Stack Overflow See other posts from Stack Overflow or by user1452373
Published on 2012-06-12T22:25:28Z Indexed on 2012/06/12 22:40 UTC
Read the original article Hit count: 312

Filed under:
|
|

Let me first describe my situation, I am working on a Linux platform and have a collection of .bmp files that add one to the picture number from filename0022.bmp up to filename0680.bmp. So a total of 658 pictures. I want to be able to run each of these pictures through a .exe file that operates on the picture then kicks out the file to a file specified by the user, it also has some threshold arguments: lower, upper. So the typical call for the executable is:

                ./filter inputfile outputfile lower upper

Is there a way that I can loop this call over all the files just from the terminal or by creating some kind of bash script? My problem is similar to this: Execute a command over multiple files with a batch file but this time I am working in a Linux command line terminal.

Thank you for your help, Luke H

© Stack Overflow or respective owner

Related posts about linux

Related posts about loops