Page is a not externally linkable
- Hardware and OS Related Technologies
-- Linux, Unix, and *nix like Operating Systems
---- Shell script to capture part of ping output


StupidScript - 8:36 pm on Jan 23, 2009 (gmt 0)


Awesome! Thanks mcavic. Here's what I ended up with (chkhost.sh):

#!/bin/bash
TMPHOST=`host dude.somehost.net ¦ awk '{print $4}'`
if ! grep $TMPHOST ignore_list
then
host dude.somehost.net ¦ awk '{print $4}' ¦ cat >> ignore_list
service portsentry restart
fi

I realized that removing the old address was absurd ... how would I remember it after it had changed? So I'm living with checking the ignore_list before I go home each day and removing any defunct entries manually.

I appreciate your help, mcavic.

[edited by: StupidScript at 8:50 pm (utc) on Jan. 23, 2009]


Thread source:: http://www.webmasterworld.com/linux/3828219.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com