I am new to shell scripting. so kindly bear with me if my doubt is too silly.
I have png images in 2 different directories and an executable which takes an images f
If you don't mind going off the beaten path (bash), the Tool Command Language (TCL) has such a loop construct:
#!/usr/bin/env tclsh
set list1 [glob dir1/*]
set list2 [glob dir2/*]
foreach item1 $list1 item2 $list2 {
exec command_name $item1 $item2
}
Basically, the loop reads: for each item1 taken from list1, and item2 taken from list2. You can then replace command_name
with your own command.