3 ms·
grep -v grep.. I wish I could admit to using this less often than I do; but it's always manual not automated. At some point I'll figure out a better alternativ
by lathiat 9y ago
grep -v grep.. I wish I could admit to using this less often than I do; but it's always manual not automated.
At some point I'll figure out a better alternative than this or pgrep which often misses processes.
- vacri 9y agoJust do 'grep [S]omeDaemon', and you won't see your grep line.
- dozzie 9y agoNo, please don't do that. Use filtering capabilities of ps, so grep becomes completely unnecessary.
- majewsky 9y agoFor manual use, I have a shell function psgrep () { ps aux | sed -n '1p;/\<sed\>/d;/'"$1"'/p' } It's basically the same "grep -v grep" trick, but with pure sed. Also, the initial "1p" ensures that I still get the column headers from ps.