Created
October 24, 2016 17:47
-
-
Save kckrinke/1f071ae9404779852a3b4e23d9e99251 to your computer and use it in GitHub Desktop.
Simple script to grep the ps list without grep'ing the grep itself
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 | |
export COLUMNS=1024 | |
exec \ | |
ps -eo pid,user,pri,stat,pcpu,command \ | |
| grep -v grep \ | |
| egrep "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment