Hi,

I'm very new to using GNU parallel, so this is probably a simple question
but I haven't been able to figure out from the resources online how to do
the following:

I have a very long script that I am running over multiple input files and I
would like to parallelize this process. So for instance,

ls *filepattern* | parallel script.sh

seems to work as far as iterating over the files. However, I need to use
the filename as a variable. So in my serial script I was doing this:

ls *filepattern* > filenames
while read filenames; do
  lots_of_stuff_$filenames
done < filenames

So how can I get gnu parallel to incorporate the current filename it is
using as a variable in my script?

Thanks

Reply via email to