
Dear all,

I've been using GNU parallel for a while and it works quite well.
However, I recently needed to run some very long commands and parallel complained that the command line was too long:

    parallel: Error: Command line too long (223235 >= 131049) at input 0: cat /tmp/10110507/adadev34gv_213...

It is a bit weird since my shell seems supports commands longer than 131049:

    $ getconf ARG_MAX
    2621440

and had no trouble running a very long command:

    $ perl -e 'print("true "."x"x10000000);' | bash
    $ echo $?
    0

Does anyone know why it is so low and/or how to change it?
thanks,



I've been thinking a bit more about this and I think I've found a way around it using `extglob`.

Right now I have the commands like:

    cat /long/path/file1 /long/path/file2 /long/path/file3 /long/path/file4 /long/path/file5 [...] /long/path/file10000 | mafft
    cat /long/path/file10001 /long/path/file10002 /long/path/file10003 /long/path/file10004 /long/path/file10005 [...] /long/path/file20000 | mafft

But if I use `extglob` I could have them much shorter:

    cat /long/path/file?(1|2|3|4|5 ... |10000) | mafft
    cat /long/path/file?(10001|10002|10003|10004|10005 ... |20000) | mafft

So I tried running it through `GNU parallel`:

    shopt -s extglob
    . `which env_parallel.bash`
    cat file_with_commands.sh | env_parallel [...]

and it seems to work. :)

thanks all for your help...
