On 25 June 2011 17:31, yacob sen <[email protected]> wrote:
> for file in *.a
> ......
> ......
> do
> prog -i $file -type s
> done
What you want would be done with: ls *.a | parallel prog -i {} -type s
> Here the executable program "prog" needs the file name as input after the
> "-i" option. I do not have also control over the output files. the prog
> program outputs the result in the directory I run.
> Is it possible to use GNU parallel for this type of jobs. I figured out that
> it is easy to pass the file name but find it it difficult to pass the date
> extracting from the filename the program.
This doesn't make much sense you need to tell us a bit more
background. What date? Why? Are you wanting to use parallel over many
hosts on a network, why is it important that the output files aren't
controlled by you??? Parallel runs commands in a similar way to how
you might with ssh. It doesn't require you to specify a special output
file, and STDOUT comes out how you might expect.
Best,
Matt.