Skip to content

Instantly share code, notes, and snippets.

@wrossmann
Last active August 25, 2015 23:07
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 wrossmann/97b428533fac46ddc6e4 to your computer and use it in GitHub Desktop.
Save wrossmann/97b428533fac46ddc6e4 to your computer and use it in GitHub Desktop.
Script:
ARGS_COMMAND='find logs -type f ! -size 0 -exec grep -l "Broken pipe" {} \;'
parallel -j $MAXJOBS -i bash -c $EXEC_COMMAND -- $($ARGS_COMMAND)
Bash -x output:
++ find logs -type f '!' -size 0 -exec grep -l '"Broken' 'pipe"' '{}' '\;'
find: missing argument to `-exec'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment