[Dshield] CAUTION email about shell scripting...
chris.meidinger at badenit.de
Wed Oct 13 19:01:05 GMT 2004
Well, the correct answer is really:
[ -x /bin/ps ] && PS_CMD=/bin/ps || mail -s "problem finding ps binary"
foo at foo.com
This, of course, goes for all binaries used in the script. Also, an
md5_check funtion would be a good idea.
I was just too lazy ....
for reference see:
> -----Original Message-----
> From: list-bounces at lists.dshield.org
> [mailto:list-bounces at lists.dshield.org] On Behalf Of J Lake
> Sent: Wednesday, October 13, 2004 20:11
> To: list at lists.dshield.org
> Subject: Re: [Dshield] CAUTION email about shell scripting...
> On Wednesday 13 October 2004 01:15 pm, Meidinger Chris wrote:
> > i'm a bit of a hack of a shell scripter, someone will
> probably have a
> > one liner for you, but .....
> > PROC=`ps aux | grep "ssh -C -p 9428 -R" | grep -v grep`
> I am risking sounding like a fool, but I always put full
> pathnames in shell scripts .... /usr/ucb/ps instead of ps for example.
> anyway i will go away now!
> DShield and the Internet Storm Center are sponsored by the
> SANS Institute.
> To learn more about current SANS training, see http://www.sans.org .
> send all posts to list at lists.dshield.org To change your
> subscription options (or unsubscribe), see:
More information about the list