[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: match across line using grep



On 2010-08-02, Zhang Weiwu <zhangweiwu@realss.com> wrote:
>
> however, it does not match the following:
>
>     select * from mytable where id=1
>     and name='foo'";
>

How about
sed -n '{/id=1/N;/name=.foo/p;d;}'


Reply to: