1. GetLogIP
#!/bin/bash
# $1 is the log filename
if [ "$1" == "" ]; then
echo "param err, no log file"
exit
fi
cat $1 | grep -a connect | awk -F "[|, ]" '{print $6}' | sort | uniq
1. GetLogIP
#!/bin/bash
# $1 is the log filename
if [ "$1" == "" ]; then
echo "param err, no log file"
exit
fi
cat $1 | grep -a connect | awk -F "[|, ]" '{print $6}' | sort | uniq
转载于:https://my.oschina.net/guyson/blog/149046