-
-
Save d630/56a4e036f2612dbdd101f6b72161c963 to your computer and use it in GitHub Desktop.
bash: multi stage pipelines with bash commands set in parentheses
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in {1..10} | |
do | |
bash -c ' | |
TIMEFORMAT=%3R | |
time ( | |
printf "%d\n" {1..10000} \ | |
| while read; do echo $REPLY done > /dev/null; | |
) | |
' | |
done \ | |
|& mawk '{ sum += $1 }; END { print sum / NR }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment