cat 关于grep的几个 使用

2021-12-19 00:00:03|tool.go:93|INFO| xxxxxxxxx costTime:24.336236ms
2021-12-19 00:00:03|tool.go:93|INFO| xx11xxxxxxx costTime:214.336236ms
2021-12-19 00:00:03|tool.go:93|INFO| xxx22xxxxxx costTime:224.336236ms
2021-12-19 00:00:03|tool.go:93|INFO| xxx444xxxxxx costTime:1.221s
2021-12-19 00:00:03|tool.go:93|INFO| xxx33xxxxxx costTime:241.336236ms
2021-12-19 00:00:03|tool.go:93|INFO| xxx555xxxxxx costTime:2.111s
2021-12-19 00:00:03|tool.go:93|INFO| xxx33xxxxxx costTime:241.336236ms
2021-12-19 00:00:03|tool.go:93|INFO| xxx444xxxxxx costTime:2.111s

将时间大于 1s的行找出来

cat costtime_1.log |grep -E "\:[1-9]\.[1-9]+s"

将时间大于 1s的并且不包括“555”的行找出来

cat costtime_1.log |grep -v "555" |grep -E "\:[1-9]\.[1-9]+s"

你可能感兴趣的:(linux软件,linux)