[comp.unix.shell] 1st annual comp.unix.shell Quiz

sleepy@wybbs.mi.org (Mike Faber) (12/28/90)

Yea, the quiz was pretty easy.  I got so many answers, I won't waste the
bandwidth with the names and their solutions.  These were the correct replys:

ps -ef | grep [u]u      (assuming no file called uu in this directory :-o)
ps -ef | grep '\u\u'    (and other variants of letting grep do the wildcards)
ps -ef | grep uu | awk '!/uu/' (I got a perl like this, too, but lost it in
                                a wildcarded rm oops... 8-()
ps -ef | awk '/uu/'     (Extra credit for no grep process)
ps -ef |grep uu | sed '/grep/d'  (This was my original solution, others got
                                  it, too)

Wrong answers included:

ps -ef |grep \u\u       (Shell won't interpret the u's and something else,
                          but it'll still print the grep process)
ps -ef | awk '$5 !~ /grep/ {print $5}  (Huh?  I want all of the info...)


If I didn't get yours, I apologize, I was a bit overwhelmed by work about
2 days after I posted the quiz.  Next year I'll wait until after Christmas
(and post a harder question :-)

--
sleepy@wybbs.UUCP
Michael Faber