Skip to content

Instantly share code, notes, and snippets.

@paulboardman
Last active September 5, 2017 09:09
Show Gist options
  • Save paulboardman/615b72f761762d6119b02dd678d67a7d to your computer and use it in GitHub Desktop.
Save paulboardman/615b72f761762d6119b02dd678d67a7d to your computer and use it in GitHub Desktop.
capture stdin and stderr from xargs command
# create babel fastsearch indexes and capture the output
find . -name "*20M.smi" -print0 | \
xargs -P 3 -L 1 -0 -I{} sh -c 'babel "$1" -ofs &> "$1.log"' -- {})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment