Delay: 10x100
Delay: 10x100
Delay: 10x100
Delay: 10x100
Delay: 10x100
Delay: 10x100
Delay: 10x100
Delay: 10x100
Delay: 10x100
Delay: 10x100
Delay: 10x100
Delay: 10x100
Delay: 10x100
Delay: 10x10
上面是我的txt文件的数据如何在延迟之后获取记录:在x100之前。请告诉我确切的语法?
答案 0 :(得分:2)
awk -F"[:x]” '$NF==100{ print $2 }' txt.file
答案 1 :(得分:2)
如果你有GNU grep,实际上可以用grep
完成。
grep -Po '^Delay: \K[1-9][0-9]*' filename