GNU parallel: output each job to a different file without pipes



This question is very close to <a href="https://stackoverflow.com/questions/22187834/gnu-parallel-output-each-job-to-a-different-file" rel="nofollow">this other</a>, but that answer is not valid for me, I think due to my shell script does not work with pipes.


This is my multi-job command :

parallel "./ClientesActivos-AP-N.sh -t 15" ::: $(seq 0 2)

I would like output to something like:

file0.out file1.out file2.out

I don't know where should I put the <strong>redirector</strong> >.

I have tested with no luck:

parallel ./ClientesActivos-AP-N.sh -t 15 ">" file{}.out ::: $(seq 0 1) parallel ./ClientesActivos-AP-N.sh -t 15 ::: $(seq 0 1) ">" file{}.out

My <strong>script</strong> works in this way:

./ClientesActivos-AP-N.sh -t 15 0 ./ClientesActivos-AP-N.sh -t 15 1 ./ClientesActivos-AP-N.sh -t 15 2

So output would go (for the above manual unparallelized example) to file0.out, file1.out and file2.out.

What is the correct way to redirect <strong>each job</strong> to a different file?

Further unsuccessful tests:

parallel --files file{}.out "./ClientesActivos-AP-N.sh -t 15" ::: $(seq 0 2)


I find that the --dry-run option is a great way to debug <strong>GNU Parallel</strong> commands. Basically, it tells you what it would do without actually doing anything - it also saves me having to write a dummy <em>"ClientesActivos"</em> script and we all know how good my Spanish isn't ;-)

So, to your immediate question, if you try this, I think what it shows is what you want to do:

$ parallel --dry-run ./ClientesActivos-AP-N.sh -t 15 {} ">" file{}.out ::: {0..1} ./ClientesActivos-AP-N.sh -t 15 0 > file0.out ./ClientesActivos-AP-N.sh -t 15 1 > file1.out


  • Teradata / Aster : Fast Export / ncluster_export using query
  • Pipe filehandle to fork of self
  • Counting number of rows grouped by date and hour
  • edit bash command gcc to compile and execute in one line
  • Unable to connect to the server: dial tcp accounts.google.com :443: getsockopt: operation timed out
  • argparse doesn't check for positional arguments
  • how to replace string in SpEL expression?
  • Appending same node in different windows
  • Count the number of non-null values in a Spark DataFrame
  • How to read data from a text file if the file location is not known in c#?
  • Converting float[,] to list in f#?
  • How to customize whisker lines on a geom_box plot differently than the lines of the box itself
  • Extract data between rows r
  • View/Download Pdf Files in React - Router 4
  • Syntax error near unexpected token 'elif'
  • Building jamvm 1.5.4 on OS X Lion
  • How can I get the full list of running processes on a Mac from a python app
  • bad substitution shell- trying to use variable as name of array
  • Display images in Django
  • Word Open XML Mail Merge
  • Python CGI os.system causing malformed header
  • Ajax Loaded meta Tags
  • Exchange data b/w iOS devices using Bluetooth 4.0
  • Master page gives error
  • Uncaught Error: Could not find module `ember-load-initializers`
  • Apache 2.4 and php-fpm does not trigger apache http basic auth for php pages
  • How to set/get protobuf's extension field in Go?
  • Sending data from AppleScript to FileMaker records
  • Running a C# exe file
  • Deserializing XML into class C#
  • Symfony2: How to get request parameter
  • Google cloud sdk not working when python points python3
  • Function pointer “assignment from incompatible pointer type” only when using vararg ellipsis
  • Why winpcap requires both .lib and .dll to run?
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • Load html files in TinyMce
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • coudnt use logback because of log4j
  • python draw pie shapes with colour filled
  • How to Embed XSL into XML