[Top][All Lists]

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

diffutils: Suggestion for regex based diff

From: Jan-Benedict Glaw
Subject: diffutils: Suggestion for regex based diff
Date: Sat, 20 May 2006 23:50:25 +0200
User-agent: Mutt/1.5.9i


For keeping eg. routers conformant to a given template, it would help
to be able to diff an actual config with a file containing only
regexps, like this:

------- config --------------
interface FastEthernet0
  ip address
  duplex auto

------- template ------------
^interface FastEthernet0$
^ ip address [0-9]+\.[0-9]+\.[0-9]+\.[0-9]$
^ duplex auto$

I tried to implement this, but I admit that I basically failed to
really understand how GNU diff works. It would be nice if somebody
could guide me a bit (or implement it if you think it's of real use.)


Jan-Benedict Glaw       address@hidden    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 für einen Freien Staat voll Freier Bürger"  | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]