<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
<div class="moz-cite-prefix">在 2016年01月07日 20:21, Burton, Ross 写道:<br>
</div>
<blockquote
cite="mid:CAJTo0LZ67jsAcGxjsDEExDOjDsqE5JwNcOitZ1PjpL10VTgObA@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr">
<div class="gmail_extra"><br>
<div class="gmail_quote">On 7 January 2016 at 03:29, Yi Zhao <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:yi.zhao@windriver.com" target="_blank">yi.zhao@windriver.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":16b" class="a3s" style="overflow:hidden">Sometimes
the grep output is not correct if the log message
contains<br>
some special characters. Use re.escape to escape all
non-alphanumerics<br>
before grep<br>
</div>
</blockquote>
</div>
<br>
If we're going to insist that the strings are literal then
instead of telling grep to use extended regexp's and passing
escaped regexs, why not just use -F which tells grep to search
for fixed strings, not expressions.</div>
</div>
</blockquote>
Hi Ross,<br>
<br>
It still need to escape quotation marks if using -F option. <br>
Consider the following log:<br>
[521514.737] (EE) evdev: Qemu Tablet: Unable to open evdev device
"/dev/input/touchscreen0".<br>
<br>
We still need an extra step to replace " with \" before grep<br>
<br>
Yi<br>
<br>
<blockquote
cite="mid:CAJTo0LZ67jsAcGxjsDEExDOjDsqE5JwNcOitZ1PjpL10VTgObA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Ross</div>
</div>
</blockquote>
<br>
</body>
</html>