Hello and thanks for the great piece of code,

is it possible to combine --shebang and --pipe options? I have a python script reading lines from stdin, processing them somehow and printing the processed lines on stdout. I would like to change #!/usr/bin/python to something like #!/usr/bin/parallel --shebang --pipe -k -j24 /usr/bin/python to ease the execution of the script, but it didn't work (atleast in version 20120322).

I think it is not important but if it helps, the script (after the change) looks like this:

#!/usr/bin/parallel --shebang --pipe -k -j24 /usr/bin/python

import sys

if len(sys.argv) > 1:
    MIN_FREQ = float(sys.argv[1])
else:
    MIN_FREQ = 10

infile = sys.stdin
outfile = sys.stdout

for line in infile:
    cols = line.split('\t')
    if float(cols[1])>= MIN_FREQ:
        outfile.write(line)

with greetings from Czech rep.,
Michel

Reply via email to