FreeBSD, and that's actually what I ended up doing basically using
cat and grep -v.
Thanks,
On Oct 17, 2007, at 9:14 PM, yitzle wrote:
If you are on a Linux machine, it might just be easier to use the grep
command with a shell script.
FILE_NAME="./log"
TMP_FILE="./tmp"
IP_TO_REMOVE="192.168.0.0|192.168.0.255"
COUNT=`grep $IP_TO_REMOVE $FILE_NAME | wc -l`
echo "The IPs occur $COUNT times"
grep -v $IP_TO_REMOVE $FILE_NAME > $TMP_FILE
mv $TMP_FILE $FILE_NAME
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/