Hi Ms. Fenderson, On Thu, 28 Feb 2019 12:20:13 +1030 Lindsey Fenderson <wildlif...@gmail.com> wrote:
> 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? > See: * https://perl.plover.com/varvarname.html * https://en.wikipedia.org/wiki/Associative_array * https://en.wikipedia.org/wiki/Command-line_interface#Arguments Regards, Shlomi > Thanks -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ “So, who the hell is Qoheleth?” - http://shlom.in/qoheleth Right to bear arms? In Soviet Russia, we have right to whole bear. — http://is.gd/EU4puV Please reply to list if it's a mailing list post - http://shlom.in/reply .