Re: [PATCH 3/3] oeqa/runtime/parselogs: escape special character for grep

Burton, Ross
2016-01-07T12:22:09Z

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

On 7 January 2016 at 03:29, Yi Zhao <yi.zhao@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.

Ross

[-- Attachment #2: Type: text/html, Size: 884 bytes --]