> why not use one simple and concise awk statement which does it all in one go?
>awk -F: '{print$1}' /etc/passwd ps -ef | awk '/[h]ttpd/{print$2}'
IMO is easier to type the "grep/grep -v" statements than the awk ones. Usually we are more used to use grep and we add pipes and filters until we get the expected result.
I'm using zsh and thanks to the Global Aliases I can do, though:
$ ps -ef G something GV grep GV ownpid
IMO is easier to type the "grep/grep -v" statements than the awk ones. Usually we are more used to use grep and we add pipes and filters until we get the expected result.
I'm using zsh and thanks to the Global Aliases I can do, though: $ ps -ef G something GV grep GV ownpid