RJ.
RJ.

Reputation: 342

GNU Parallel - How to capture the output in files with names using input argument

cat /tmp/input
>user1   tag1
>user2   tag2
>user3   tag3

Running the parallel command as:

parallel -j2 --colsep '\t' -a "/tmp/input" python script.py > /var/output/log_$1_$2.txt

I want the respective output to be in files with names: - log_user1_tag1.txt - log_user2_tag2.txt

Upvotes: 2

Views: 327

Answers (1)

RJ.
RJ.

Reputation: 342

Figured out the way:

parallel -j2 --colsep "\t" -a"/var/tmp/2" php /var/1.php $1 $2 ">" /var/renoj/logs/file_{1}_{2}.log

Upvotes: 1

Related Questions