我正在从多个文件中提取一个字符串,但是一个不希望有的副作用是文件名在输出之前添加了前缀。如何仅使用grep抑制文件名输出?
$ grep -i lp lpNet*
lpNet:This was printed via the internet using the lp command.
lpNet:I believe lp doesnt care what the device is.
lpNet1:This was printed via the internet using the lp command.
lpNet1:I believe lp doesnt care what the device is.
lpNet2:This was printed via the internet using the lp command.
lpNet2:I believe lp doesnt care what the device is.
lpNet3:This was printed via the internet using the lp command.
lpNet3:I believe lp doesnt care what the device is.
我已经使用cat lpNet *解决了该问题。grep lp我只是想知道是否有更有效的途径来达到相同的效果