Awk 匹配文字等号

Awk 匹配文字等号,awk,pattern-matching,Awk,Pattern Matching,将某列中的文字等号(=)与awk精确匹配的语法是什么 我尝试过(在第2列匹配): 但是我总是遇到语法错误。您只需要: awk ' $2 == "=" ' yourfile 或 不需要cat文件| awk… 在awk awk ' $2 == "=" ' yourfile awk ' $2 ~ /^=$/ ' yourfile

将某列中的文字等号(=)与awk精确匹配的语法是什么

我尝试过(在第2列匹配):

但是我总是遇到语法错误。

您只需要:

awk  ' $2 == "=" ' yourfile

不需要
cat文件| awk…

awk

awk  ' $2 == "=" ' yourfile
awk  ' $2 ~ /^=$/ ' yourfile