Skip to content

Instantly share code, notes, and snippets.

@kevinkirkup
Created November 30, 2009 01:24
Show Gist options
  • Save kevinkirkup/245184 to your computer and use it in GitHub Desktop.
Save kevinkirkup/245184 to your computer and use it in GitHub Desktop.
Bash function to grep the process list
############################################################
# Function to grep the list of precesses
function grep_process() {
if [ ! -z "$1" ] ; then
ps aux | grep -i "$1" | grep -v grep
else
echo "Need a process name to grep processes for..."
fi
}
alias psg='grep_process'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment