Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Ignore grep command self-match' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Ignore grep command self-match
Authored by: forman on Aug 05, '05 02:25:34PM
To save a little time typing, simply create an "alias" for this command in your "~/.cshrc" file. For instance, I have an alias called "psg" (ps and grep) that omits the original grep from the process list (grep -v grep) and does a case-insensitive search:
alias psg  'ps -augxww | grep -v grep | grep -i'
Add that to your ".cshrc" file, type "source .cshrc" to read in the changes, and then type "psg server" to test it out.

Michael.

[ Reply to This | # ]
Alias for bash users:
Authored by: lionel77 on Aug 05, '05 03:34:10PM

If you are using bash, you want to put the following line into your .bashrc file:

alias psg='ps -augxww | grep -v grep | grep -i'



[ Reply to This | # ]