1

I would like to use Gnu parallel to parallelized a psql command like :

SELECT func('param', 10);

But as gnu parallel uses the simple quote to delimit the bash command, like :

seq 0 9 | parallel -jobs 10 'psql -c "SELECT func('param', 10);"' \> {}.log

this is not working.

I tried different ways, without success. So I really appreciate some help.

  • For GNU Parallel you would typically make a function and call that. This way you avoid all the \-circus and it will often make your code more readable. https://www.gnu.org/software/parallel/man.html#EXAMPLE:-Calling-Bash-functions – Ole Tange Oct 22 '18 at 10:01

0 Answers0