分类: LINUX
2006-01-05 23:52:22
#!/bin/bash
cat /proc/net/ip_conntrack > temp.$$ echo "" > file while read line do word=`echo $line|awk '{print $5}' | awk -F= '{print $2}'` grep "${word}" file || echo "`awk '{print $5}' /proc/net/ip_conntrack | grep -o "src=$word" |wc -l ` $word" >>file done < temp.$$ my_exit() { rm -f temp.$$ > /dev/null 2>&1 } my_exit trap "my_exit" 2 |
/bin/bash |