Created
October 12, 2020 08:24
-
-
Save moriglia/0ab1c459de0b700caa503092de3f11b8 to your computer and use it in GitHub Desktop.
Get command that has been executed to create the given thread
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 | |
if [ $# -ne 1 ] ; then | |
echo "Usage: $0 <pid>"; | |
echo " "; | |
echo "Get command from pid"; | |
exit -1; | |
fi | |
ps -q $1 -o cmd | tail -n 1 ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment