Skip to content

Instantly share code, notes, and snippets.

@minkcv

minkcv/psgrep Secret

Created July 20, 2015 19:49
Show Gist options
  • Save minkcv/81b742920315e01b3bb9 to your computer and use it in GitHub Desktop.
Save minkcv/81b742920315e01b3bb9 to your computer and use it in GitHub Desktop.
grep for a process
#!/bin/bash
ps aux | head -n 1
ps aux | grep $1
#should this be ps aux | grep $@ ?
@zkxs
Copy link

zkxs commented Jul 20, 2015

#!/bin/bash
ps -Ne u
ps aux | fgrep "$1" | fgrep -v fgrep | fgrep -v $$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment