"Strong Scripting Skills" - a definition?
Paul M. Moriarty
pmm at igtc.com
Mon Jan 26 18:07:15 PST 2004
jimd at starshine.org writes:
> On Sat, Jan 24, 2004 at 09:14:09PM -0800, richard childers / kg6hac wrote:
>
>
> >> how will I know
> >> when I can say with confidence that I have "strong" scripting skills?
>
> The phrase is clearly ambiguous and subjective. I've taught classes in
> shell scripting.
>
> I once had an interviewer put up a wretched fragment of shell code like:
>
> kill `ps wax | grep "foo" | grep -v "grep" | awk '{print $11}'`
>
Hey! Somebody's stealing my question!
Actually, the use of grep in this pipeline is quite valid. I have had
people tell me the -v optiion was for verbose (I shit you not. And these
were people representing themselves as senior sysadmins). I also use the
question to see if people know why "grep foo" shows up in the output of ps
(many don't). You also left off the last pipe which I believe is |xargs rm.
Again, a lot of people are unfamiliar with xargs.
You can get 6 good questions out of this. Granted, if I had interviewed you
and you replied with your alternative, I would have been quite impressed.
This quesion was derived in 1989 or 1990, I forget which. Most systems
support killall these days. :)
- Paul -
More information about the Baylisa
mailing list