title: Download multiple files simultaneously (parallel) with custom filenames
body: <p>In a bash script, I am trying to download multiple files <strong>in parallel</strong>, with <strong>custom filenames</strong> using <strong>a single</strong> command (no loops).</p>
  
  <p>I tried using aria2c:</p>
  
  <pre><code>aria2c -j2 URL1 URL2                # BAD: outputs to a single file
  
  aria2c -j2 -Z URL1 -o 1 URL2 -o 2   # BAD: filenames taken from link (-o is ignored)
  </code></pre>
  
  <p>The second one ignores the output filename because, quoting the  aria2c manpage:</p>
  
  <blockquote>
    <p>In Metalink or BitTorrent download you cannot specify file name.  The file name  specified  here
    is  only  used  when  the  URIs  fed  to  aria2  are  done by command line without --input-file,                 --force-sequential option. For example:</p>
    
    <p>$ aria2c -o myfile.zip "<a href="http://example1.com/file.zip" rel="noreferrer">http://example1.com/file.zip</a>" "<a href="http://example2.com/file.zip" rel="noreferrer">http://example2.com/file.zip</a>"</p>
  </blockquote>
  
  <p>This is what I want to avoid:</p>
  
  <pre><code>aria2c URL1 -o 1 &amp;
  aria2c URL2 -o 2 &amp;
  aria2c URL3 -o 3                     # BAD: slow and ugly, because aria2c is called thrice
  </code></pre>
  
  <p>Any suggestions?</p>