5

I'm using GNU Parallel to concurrently run a command several thousand times.

To get logs of the execution I'm using --files and --results.

To get nice progress bar while it's running I'm using --eta and --progress.

Now, my problem is that while STDERR is redirected to the files, it is still printed to the terminal, which corrupts my progress bar.

How can I suppress printing STDERR to terminal? I still want to have this information in the log files, so I can't just wrap the command into 2>/dev/null.

So far my command line looks like this:

cat input.txt | parallel -P 10 --progress --eta --files --results output_dir/ "./script.sh some-arg {}"
Jasiu
  • 171
  • 1
  • 2

2 Answers2

1

If you want a nice bar, may I suggest --bar instead of --eta? You need version 20131122 or later.

This seems to work, since STDERR files are not printed, so you get nothing on STDERR apart from the --bar:

cat input.txt | parallel -P 10 --bar --files --results output_dir/ "./script.sh some-arg {}" >/dev/null
Ole Tange
  • 4,529
  • 2
  • 34
  • 51
0

This worked for me :

parallel --bar --jobs 10 '(ffmpegthumbnailer -i "{}" -o "/tmp/${DIR}/{}.jpg" -f 2>/dev/null)'  ::: *.mp4