Skip to main content
deleted 152 characters in body
Source Link

Try using the -u option of GNU parallel.

#!/bin/bash # handle.sh while true do echo "1\n2\n3" | parallel echo-u "$1-$RANDOM" doneIX ./handle_X.sh 

ThenThis runs them in parallel, running echo "1\n2\n3" | parallel -u ./handle.sh gives me continuous output from all streamswithout buffering the entirety of any process.

To split out to multiple scripts, try (untested): parallel -IX ./handle_X.sh

Try using the -u option of GNU parallel.

#!/bin/bash # handle.sh while true do  echo "$1-$RANDOM" done 

Then, running echo "1\n2\n3" | parallel -u ./handle.sh gives me continuous output from all streams.

To split out to multiple scripts, try (untested): parallel -IX ./handle_X.sh

Try using the -u option of GNU parallel.

echo "1\n2\n3" | parallel -u -IX ./handle_X.sh 

This runs them in parallel, without buffering the entirety of any process.

Source Link

Try using the -u option of GNU parallel.

#!/bin/bash # handle.sh while true do echo "$1-$RANDOM" done 

Then, running echo "1\n2\n3" | parallel -u ./handle.sh gives me continuous output from all streams.

To split out to multiple scripts, try (untested): parallel -IX ./handle_X.sh