Skip to content

Instantly share code, notes, and snippets.

@tracertea
Created September 8, 2015 18:38
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/cbc3ba6c4b86070024ab to your computer and use it in GitHub Desktop.
Save tracertea/cbc3ba6c4b86070024ab to your computer and use it in GitHub Desktop.
Pass a parameter to multiple commands
find . -type f ! -name '*.strings' -exec sh -c 'strings $0 > $0.strings' {} \;
sh -c 'echo command1 $0; echo command2 $0' 'hello world'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment