Skip to content

Instantly share code, notes, and snippets.

@bioshazard
Created October 8, 2019 16:32
Show Gist options
  • Save bioshazard/8c24bbc4fb9396499c2e573054d28422 to your computer and use it in GitHub Desktop.
Save bioshazard/8c24bbc4fb9396499c2e573054d28422 to your computer and use it in GitHub Desktop.
Generate list of PIDs in a format ready for strace
#!/bin/bash
echo -p $(pgrep $1 | tr '\n' '%' | sed 's@%$@@g;s@%@ -p @g')
@bioshazard
Copy link
Author

Alternatively, echo -p $(pgrep $STRACEME | tr '\n' '%' | sed 's@%$@@g;s@%@ -p @g')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment