当模式字符串中有句点(。)时, agrep 会给出错误agrep: pattern too long (has > 32 chars)
,否则不会。
我想比较(大约)两个字符串,所以我为此使用 agrep 但它给出了一个错误agrep: pattern too long (has > 32 chars)
。但是我发现如果模式字符串中没有句号,它不会给出错误(为什么?)
`echo "The quick brown fox jumped over the lazy dog." | agrep -c -4 "The quick brown fox jumped over the lazy dog."`
预期的输出是 1 而它给出了一个错误:
agrep: pattern too long (has > 32 chars)
如果我删除句号,它会起作用:
$ echo "The quick brown fox jumped over the lazy dog." | agrep -c -4 "The quick brown fox jumped over the lazy dog"
1