, b'cos it don't match "is.a.server"我有一个变量match_for="foo\|barnode is.a.server.and.clientfoo.lnx station not.a.server
foo.l is.a.server.linuxmy bar.unx node
以前从未在Linux上使用过awk,我正试图了解它是如何匹配正则表达式的。例如,在过去,根据我的经验,正则表达式/2/将匹配以下所有行中的2。这将匹配2这将不匹配22将匹配,这将不匹配22可能匹配
匹配的行是This will not match2,它表示它与第2行匹配,因为如果我用awk '{if(NR~3)print}' sample.txt