如何在bash中找到特定的模式
我想在一个文件中找到一个模式如何在bash中找到特定的模式,bash,awk,Bash,Awk,我想在一个文件中找到一个模式'@s241',它很容易使用: grep '@s241' file 或 但问题是该文件包含诸如@s2470或@s2478之类的模式 我如何指定没有扩展名的确切模式为@s247 谢谢在grep中使用-w grep -w '@s247' file 或 或 在grep中使用-w grep -w '@s247' file 或 或 在grep中使用-w grep -w '@s247' file 或 或 在grep中使用-w grep -w '@s247' file 或
'@s241'
,它很容易使用:
grep '@s241' file
或
但问题是该文件包含诸如@s2470或@s2478之类的模式
我如何指定没有扩展名的确切模式为@s247
谢谢在grep中使用
-w
grep -w '@s247' file
或
或
在grep中使用
-w
grep -w '@s247' file
或
或
在grep中使用
-w
grep -w '@s247' file
或
或
在grep中使用
-w
grep -w '@s247' file
或
或