2022:04:25 00:00:12 Probing 192.168.1.100:1081/tcp - Port is open - time=5.456ms 2022:04:25 00:00:13 Probing 192.168.1.100:1081/tcp - Port is open - time=2.339ms 2022:04:25 00:00:15 Probing 192.168.1.100:1081/tcp - Port is open - time=2.443ms 2022:04:25 00:00:17 Probing 192.168.1.100:1081/tcp - Port is open - time=2.255ms 2022:04:25 00:00:18 Probing 192.168.1.100:1081/tcp - Port is open - time=2.236ms
答:
# By me ,吹牛哥, 雨夜人,ghost, PF
awk -F"ms" '/^2022/ {print $(NF-1)}' 1081.txt | awk -F"=" '$NF>3{print $0 "ms"}'
gawk '{match($0,"^.*time=(.*)ms$",arr); if(arr[1]>3) {print $0}}' text.txt
awk -F= 'int($NF)>3' 1.txt
awk -F'[= a-z]+' '$(NF-1)>3' 1.txt
# 这里的+号解释为 : 0+ 省略了0
awk -F'time=' '+$NF>3' 1.txt
awk -F'[=.]' '$(NF-1)>=3' file
#$F[1]>3为真,x=1,打印当前行。 -alnE'$F[-1]>3&&say'
perl -F= -ape'$_ x=$F[1]>3' file



