All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yi Zhao <yi.zhao@windriver.com>
To: "Burton, Ross" <ross.burton@intel.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 3/3] oeqa/runtime/parselogs: escape special character for grep
Date: Fri, 8 Jan 2016 16:44:31 +0800	[thread overview]
Message-ID: <568F76EF.20009@windriver.com> (raw)
In-Reply-To: <CAJTo0LZ67jsAcGxjsDEExDOjDsqE5JwNcOitZ1PjpL10VTgObA@mail.gmail.com>

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



在 2016年01月07日 20:21, Burton, Ross 写道:
>
> On 7 January 2016 at 03:29, Yi Zhao <yi.zhao@windriver.com 
> <mailto: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.
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


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

  reply	other threads:[~2016-01-08  8:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-07  3:29 [PATCH 0/3] oeqa/runtime: improve some test cases Yi Zhao
2016-01-07  3:29 ` [PATCH 1/3] oeqa/runtime/smart: fix hardcoded root directory Yi Zhao
2016-01-07  3:29 ` [PATCH 2/3] oeqa/runtime/logrotate: " Yi Zhao
2016-01-07  3:29 ` [PATCH 3/3] oeqa/runtime/parselogs: escape special character for grep Yi Zhao
2016-01-07 12:21   ` Burton, Ross
2016-01-08  8:44     ` Yi Zhao [this message]
2016-01-08  8:59       ` Burton, Ross
2016-01-12  1:51         ` Yi Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=568F76EF.20009@windriver.com \
    --to=yi.zhao@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=ross.burton@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.