Skip to content

Instantly share code, notes, and snippets.

@tracertea
Created March 20, 2018 16:45
Show Gist options
  • 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