[Orca-users] Re: Problem starting ORCA via SSH command

Peter Radcliffe pir at pir.net
Thu Apr 18 18:50:29 PDT 2002


Sean O'Neill <soneill at oneill.dhs.org> probably said:
> At 12:09 PM 4/18/2002 -0700, Blair Zajac wrote:
> >Try changing the line:
> >pids=`/usr/ucb/ps auxww | $AWK '/orcallator.se/ && !/awk/ {print $2}'`
> >to
> >pids=`/usr/ucb/ps auxww | grep '[o]rcallator.se' | $AWK {print $2}'`
> >and let me know if this stops the burps.
> Let it be known the burps have stopped.

Script writing rule of thumb #346;
If you are piping grep output into awk, you shouldn't be.

pids=`/usr/ucb/ps auxww | \
                 $AWK '/[o]rcallator.se/ && $9 != "'$AWK'" {print $2}'`

If you are paranoid you can also add a;
  && $1 == "root"
to make sure you don't accidentally kill off a user's process that happens
to include the name orcallator.se.

P.

--
pir                pir-sig at pir.net                 pir-sig at net.tufts.edu



More information about the Orca-users mailing list