Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 15 lines (13 sloc) 0.398 kb
#!/bin/sh
# Usage: a psgrep PATTERN
# Summary: Find running processes using grep
# Help: This is a tiny wrapper to search for a regex PATTERN
# in the output of `ps aux`, excluding the grep process itself.
#
# EXAMPLES
#
# Show all Ruby processes:
#
# a psgrep 'ruby'
#
ps aux | awk '/'"$@"'/ && !/a-psgrep/ { $1 = ""; for(i=3; i <= 10; i++) { $i = "" }; gsub(/^ +| +/, " ", $0); print $0 }'
Jump to Line
Something went wrong with that request. Please try again.