Created
October 8, 2019 16:32
-
-
Save bioshazard/8c24bbc4fb9396499c2e573054d28422 to your computer and use it in GitHub Desktop.
Generate list of PIDs in a format ready for strace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -p $(pgrep $1 | 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
Alternatively,
echo -p $(pgrep $STRACEME | tr '\n' '%' | sed 's@%$@@g;s@%@ -p @g')