I have a program named threshold. I have a set of images in a directory named images.
|-- images
| -----img_1.jpg
| -----img_2.jpg
| -----img_3.jpg
| ------
| ------img_n.jpeg
|-- threshold.exe
|-- myscript
How to write a bash script, so that it accepts the directory name as the argument and pass each of the files in the directory individually as argument to program threshold.exe.
If I execute,
$./myscript images
The final execution should be like this.
./threshold.exe img_1.jpg
./threshold.exe img_2.jpg
....
....
./threshold.exe img_n.jpg