Created
December 25, 2018 04:13
-
-
Save caramelchocolate/910c154a402462287ef4039c09ce387d to your computer and use it in GitHub Desktop.
Execute Any commands in parallel.
This file contains hidden or 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
#!/bin/sh | |
cat <<-EOF | xargs -L1 -P4 sh -c | |
'sleep 3; echo "sleep3 end"' | |
'sleep 4; echo "sleep4 end"' | |
'sleep 2; echo "sleep2 end"' | |
'sleep 1; echo "sleep1 end"' | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment