提取ip地址列表: cat file.txt |grep -Eo '([0-9]{3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3})' 删除重复行: sort -n test.txt | uniq