title: Is there a "one-liner" for submitting many jobs to SLURM (similar to LSF)?
body: <p>Can I submit "one-liners" to SLURM?</p>
  
  <p>Using <code>bsub</code> from LSF and the standard Linux utility <code>xargs</code>, I can easily submit a separate job for uncompressing all of the files in a directory:</p>
  
  <pre><code>ls *.gz | sed 's/.gz$//g' | xargs -I {} bsub 'gunzip -c {}.gz &gt; {}'
  </code></pre>
  
  <p><BR>
  Using SLURM, I thought that <code>srun</code> or <code>sbatch</code> would be work, but to no avail:</p>
  
  <pre><code>ls *.gz | sed 's/.gz$//g' | xargs -I {}  srun 'gunzip -c {}.gz &gt; {}'
  gzip: srun: error: compute-node-01: task 0: Exited with exit code 1
  stdin: unexpected end of file
  
  ls *.gz | sed 's/.gz$//g' | xargs -I {}  sbatch 'gunzip -c {}.gz &gt; {}'
  sbatch: error: Unable to open file gunzip -c naive_S1_L001_R1_001.fastq.gz &gt; naive_S1_L001_R1_001.fastq
  </code></pre>
  
  <p>I have seen <code>bsub</code> from LSF <a href="http://umbc.rnet.missouri.edu/resources/Submitting_Jobs_via_SLURM.html#slurmvslsf" rel="nofollow noreferrer">listed as equivalent</a> to <code>sbatch</code> from SLURM, but so far it seems that they are only equivalent for submitting script files:</p>
  
  <pre><code>                  SLURM                    LSF
                    --------------------     ------------------
  Job Submission    sbatch [script_file]     bsub [script_file]
  </code></pre>
  
  <p>Is there any other way to submit "one-liner" jobs with SLURM?</p>