[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug #25231] grep fails with searches that have \" more than once
From: |
Dave B |
Subject: |
Re: [bug #25231] grep fails with searches that have \" more than once |
Date: |
Fri, 02 Jan 2009 22:49:00 +0100 |
User-agent: |
Thunderbird 2.0.0.18 (X11/20081124) |
anonymous wrote:
> Details:
>
> When doing the following:
>
> echo '\"\"' > somefile
> cat somefile
> grep '\"\"' somefile
>
> Grep fails to give the expected output of 1:\"\", and instead gives nothing
> and returns with exit code 1. This seems to happen with any string with \"
> more than once in it.
If you want to look for a literal \, you have to escape it in the regular
expression.
$ echo '\"\"' > somefile
$ cat somefile
\"\"
$ grep '\\"\\"' somefile
\"\"
--
D.