[Terminal] cat -n file | grep "xxx" , 没有结果或结果有问题
Tofloor
poster avatar
毛启圣
deepin
2022-05-07 00:22
Author

i wan`t search log ,but not result

675417 ------ 80.663s was the duration of 'DUMPSTATE' ------
675418 Ignoring because device is on DND mode MIUI_SILENT
675419 Ignoring because device is on DND mode MIUI_SILENT
675420 Ignoring because device is on DND mode MIUI_SILENT
maoqis@maoqis-PC:/Documents$ cat -n /home/maoqis/Downloads/bugreport-2022-05-06-144719/bugreport_1651819639532.log | grep DUMPSTATE
匹配到二进制文件 (标准输入)
maoqis@maoqis-PC:
/Documents$

Reply Favorite View the author
All Replies
毛启圣
deepin
2022-05-07 00:26
#1

没想到第一次 在家办公 终端 cat grep 都没法使用,deepin 使用成本太高啦

Reply View the author
zijinyise
deepin
2022-05-07 01:22
#2

没问题啊

捕获.PNG

Reply View the author
liwl
deepin
2022-05-07 04:00
#3
毛启圣

没想到第一次 在家办公 终端 cat grep 都没法使用,deepin 使用成本太高啦

这。。。。

deepin不背锅

Reply View the author
callcz
deepin
2022-05-07 04:57
#4

囧rz,deepin不背锅,请为grep添加-a参数

cat -n file | grep -a "xxx"
Reply View the author