Someone shared these handy functions with us a couple of years back

function third(){ awk '{if (NR%3==0){print "\033[32m" $0 "\033[0m"} else{print}}'; }

every third line looks nice

#bash #sh #zsh #ksh #csh #100DaysOfCode #Linux #POSIX #advancedProgramming

function psgrep() { ps axuf | grep -v grep | grep "$@" -i --color=auto; }

greps your processes and shows them in a nice manner (as a tree)

#bash #sh #zsh #ksh #csh #100DaysOfCode #Linux #POSIX #advancedProgramming

@RadioAzureus nice! Why not pgrep?

@alan

The wonderfull thing about functions is that you can alias them as you feel fit. so you may use 'pgrep' as the function name for yourself

@RadioAzureus yep, but I think the built-in command pgrep does more or less the same thing as your psgrep function.

@alan I just checked out pgrep, the default output does not give anything else but the process numbers

That means you need to add switches to get something similar to what the PSgrep function does