Gentoo Archives: gentoo-user

From: Christoph Gysin <cgysin@×××.ch>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] confusing RE doesn't work in diff
Date: Wed, 27 Jul 2005 07:48:47
Message-Id: 42E73B1D.6080900@gmx.ch
In Reply to: Re: [gentoo-user] [OT] confusing RE doesn't work in diff by Zhang Weiwu
1 Zhang Weiwu wrote:
2 > zhangweiwu@Bach:/tmp$ diff -I "^[[:space:]]*/[*].*[*]/[[:space:]]*$" header.inc.php empty
3 > 1,2d0
4 > < <?php
5 > < /* $Id: header.inc.php.template,v 1.58 2005/07/08 05:00:14 milosch Exp $ */
6 >
7 > in man it's being said,
8 > -I RE --ignore-matching-lines=RE
9 > Ignore changes whose lines all match RE.
10 >
11 > I read man grep and it seems there are two sets of RE, extended and basic. But it's not mensioned in diff(1) wheather or not diff(1) takes extended or basic RE. I am using Debian so it should be gnu diff.
12
13 If it's not mentioned, it possibly uses basic regular expressions.
14
15 try:
16
17 $ diff -I '/\* \$Id.*\$ \*/' header.inc.php empty
18
19 Christoph
20 --
21 echo mailto: NOSPAM !#$.'<*>'|sed 's. ..'|tr "<*> !#:2" org@fr33z3
22 --
23 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] [OT] confusing RE doesn't work in diff "Mariusz Pękala" <skoot@××.pl>