gaohan 发表于 2018-8-18 11:17:45

一次shell的过滤IP

egrep -o '{1,3}\.{1,3}\.{1,3}\.{1,3}' text.txt运维给出的方法  
grep -oP '((\d)+.){3}\d+' test.txt                DBA给出的方法
  
sed -e s/\"}/\\n/g -e s/[^0-9\.\\n]//g txt      程序猿给出的方法


页: [1]
查看完整版本: 一次shell的过滤IP