bug-parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GNU Parallel Bug Reports Bash for loop parallelising


From: Samdani A
Subject: GNU Parallel Bug Reports Bash for loop parallelising
Date: Thu, 20 Oct 2016 14:38:12 +0530

Hi

Am trying to convert a simple bash script file which is given below. I was able to do it using parallel but not able to use multiple functions in the same line. Is there any other possible way to do the full job inside the for loop using parallel?

#!/bin/bash
mkdir csv
for f in *.txt
do
  command -n -c $f >$f.csv
  mv $f.csv csv/
  rm $f
done


using parallel:

parallel command -n -c {} '>' {.}.csv ::: *.txt

reply via email to

[Prev in Thread] Current Thread [Next in Thread]