利用shell抓出mail log 的 said: 550 Posted on 十一月 17, 2008 by shian Share正好需要分析一下mail 的log檔,要抓取出550類的狀態mail出來,所以直接利用shell script來做,可以很快的分析log並抓取mail狀態為550出來。 ?View Code BASH1 2 3 4 #!/bin/bash file="/var/log/mail" tmp="./edm_tmp.txt" cat $file | grep 'said: 550' | awk '{print $7}' | sed 's/to=,//gp' | uniq > $tmp 參考資料 Shell 設計入門 Share this:FacebookDiggPrintEmail相關文章Linode Facilities Speedtest (0)Apache install mod_fastcgi & php-fpm (0)centos install dropbox (5)ipflow (0)Function registration failed – duplicate name (0)eAccelerator (1)