[OE-core] [PATCH 3/3] oeqa/runtime/parselogs: escape special character for grep

Yi Zhao yi.zhao at windriver.com
Fri Jan 8 08:44:31 UTC 2016



在 2016年01月07日 20:21, Burton, Ross 写道:
>
> On 7 January 2016 at 03:29, Yi Zhao <yi.zhao at windriver.com 
> <mailto:yi.zhao at windriver.com>> wrote:
>
>     Sometimes the grep output is not correct if the log message contains
>     some special characters. Use re.escape to escape all non-alphanumerics
>     before grep
>
>
> 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.
Hi Ross,

It still need to escape quotation marks if using -F option.
Consider the following log:
[521514.737] (EE) evdev: Qemu Tablet: Unable to open evdev device 
"/dev/input/touchscreen0".

We still need an extra step to replace " with \" before grep

Yi

>
> Ross

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20160108/3cc22bd0/attachment-0002.html>


More information about the Openembedded-core mailing list