egrep输出显示符号

时间:2014-02-21 13:41:17

标签: unix grep

我的egrep输出显示符号。

命令:

egrep "acsslc|adl04085|aprsvq0|brymfghp4|brymkt02|brymkthp4|ccenaq7|davagemaq0|davb031|davipa1|davipa10042|moxipra20024|mxawhse" /home/pandapx/prd_det_ROT.d

输出:

"acsslcL" "" "1o8d2e64F0p10h12v3T3G" "" "1o8d2e64F0p16.66h8.5v0T3G" "" "" "" 68 10 "" "HP L" yes "lp -s -onb -dacsslc" "
" "" "" "" "" "" 0 no ""
"acsslcP" "HP 4SI/5SI" "
0OU0p10h12v0s0b3T66P2E7.8689C66F3G" "" "
0OU0⎻16.66␤8.5┴0⎽0␉0T66P2E7.8689C66F3G" "" "" "" 66 10 "" "␤⎻ ⎻⎺⎼├." ≤␊⎽ "┌⎻ -⎽ -⎺┼␉ -␍▒␌⎽⎽┌␌" "" "" "" "" "" "" 0 ┼⎺ ""
"A±␊└▒─0L" "HP L▒⎽␊⎼┘␊├ (L▒┼␍⎽␌▒⎻␊)" "
1OU0⎻10␤12┴0⎽0␉3T66P2E7.8689C66F3G" "" "
1OU0⎻16.66␤8.5┴0⎽0␉0T66P2E7.8689C66F3G" "" "" "" 50 10 "" "HP LAND" ≤␊⎽ "┌⎻ -␍␍▒┴▒±␊└▒─0 -⎽" "" "" "" "" "" "" 0 ┼⎺ ""

有人可以帮我解决这个问题吗?

1 个答案:

答案 0 :(得分:0)

如果您需要从包含二进制数据的文件中提取ascii,请使用strings并将输出通过管道传输到egrep,如下所示

strings /home/pandapx/prd_det_ROT.d | egrep "acsslc|adl04085|aprsvq0|brymfghp4|brymkt02|brymkthp4|ccenaq7|davagemaq0|davb031|davipa1|davipa10042|moxipra20024|mxawhse"