Unexpected header.nextMessage.response.statusLine.statusCode := 403 with 180 unmatched
我想下面的文本用grep到VAR:nextMessage.response.statusLine.statusCode := 403
如何“grep的”文本中间用特殊字符
我用这个命令:exp=$(grep -oP '(?<=header).+(?=with)' text.txt)
但进账只有这一部分:无403 .nextMessage.response.statusLine.statusCode
。
'echo“Unexpected header.nextMessage.response.statusLine.statusCode:= 403 with 180 unmatched”| grep -oP'(?<= header)。+(?= with)''适用于gnu grep 2.16。你使用什么版本的grep? –
grep(GNU grep)2.10。但我无法更新它,因为我在特定的环境中工作,我无法更新任何东西。 emm ....我检查:“回声”它的工作 – ascentman
也许它可能是问题,实际上我使用2 grep在管道中: exp =($(grep“* with *”text.txt | grep -oP '(?<= header)。+(?= with)'text.txt)) – ascentman