Last active
August 29, 2015 14:14
-
-
Save tomykaira/5cde0ce56f0346e0a67b to your computer and use it in GitHub Desktop.
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
function pp () { | |
export PREVIOUS_PP_ARGS="$*" | |
pgrep -lfa $* | |
} | |
function pk () { | |
if [ $# -eq 0 ]; then | |
pgrep -lf $PREVIOUS_PP_ARGS | awk '{print $1}' | xargs kill | |
else | |
pgrep -lf $PREVIOUS_PP_ARGS | sed "$1q;d" | awk '{print $1}' | xargs kill | |
fi | |
} | |
function pkk () { | |
if [ $# -eq 0 ]; then | |
pgrep -lf $PREVIOUS_PP_ARGS | awk '{print $1}' | xargs kill -9 | |
else | |
pgrep -lf $PREVIOUS_PP_ARGS | sed "$1q;d" | awk '{print $1}' | xargs kill -9 | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment