Skip to content

Instantly share code, notes, and snippets.

@tracertea
Created March 20, 2018 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tracertea/3d70a07b1ec5b1248fc82743425d5292 to your computer and use it in GitHub Desktop.
Save tracertea/3d70a07b1ec5b1248fc82743425d5292 to your computer and use it in GitHub Desktop.
Stop xargs from performing further processing when event is triggered
seq 1 30 | xargs -I {} bash -c 'if [ "$0" == "10" ]; then exit 255; fi; echo $0' {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment