From owner-freebsd-stable Sat May 19 12:14:57 2001 Delivered-To: freebsd-stable@freebsd.org Received: from mail.gmx.net (pop.gmx.net [194.221.183.20]) by hub.freebsd.org (Postfix) with SMTP id 2C6F537B42C for ; Sat, 19 May 2001 12:14:54 -0700 (PDT) (envelope-from Gerhard.Sittig@gmx.net) Received: (qmail 31235 invoked by uid 0); 19 May 2001 19:14:52 -0000 Received: from pd950884e.dip.t-dialin.net (HELO speedy.gsinet) (217.80.136.78) by mail.gmx.net (mail07) with SMTP; 19 May 2001 19:14:52 -0000 Received: (from sittig@localhost) by speedy.gsinet (8.8.8/8.8.8) id PAA08321 for stable@freebsd.org; Sat, 19 May 2001 15:43:11 +0200 Date: Sat, 19 May 2001 15:43:11 +0200 From: Gerhard Sittig To: stable@freebsd.org Subject: Re: Administrative tag a possibility? Message-ID: <20010519154311.D253@speedy.gsinet> Mail-Followup-To: stable@freebsd.org References: <200105170543.f4H5hvZ01232@mass.dis.org> <3B04907A.5986E12D@nisser.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <3B04907A.5986E12D@nisser.com>; from roelof@nisser.com on Fri, May 18, 2001 at 05:01:14AM +0200 Organization: System Defenestrators Inc. Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, May 18, 2001 at 05:01 +0200, Roelof Osinga wrote: > > But alas, it isn't. So if the quick and dirty solution is > unacceptable than how about increasing its smarts? Going by the > example given > > -# $Id: gettytab,v 1.16 1998/09/02 01:34:55 brian Exp $ > +# $FreeBSD: src/etc/gettytab,v 1.16.2.1 1999/08/29 14:18:43 peter Exp $ > > This suggest that a convention is already in place. Like - > hubba, hubba; it's been a long time since I've last done > interesting regexps - > > "$[A-Z][:alpha:]+: .*, v [0-9]+.[0-9][0-9].*[0-9]@4/[0-9]@2/[0-9]@2 \ > [:HhMmSs:] .* $" This way you would match on _any_ pattern looking like a RCS tag. But I'd rather enumerate the ones explicitely (we noticed "Id" and "FreeBSD"). I don't actually know that there are some tags of special interest or even dangerous to ignore, but I would play it safe. If you want to cut corners and match with a "bigger" or more general pattern, you could as well 'ident $FILE > $PATTERNS' and have them collapse like this (it's a sketch, not real code) cp $FILE $TEMP while read P; do P=`echo "$P" | sed 's/^ *//; s/ *$//'` # needed? cat $FILE | sed 's/\('"$P"'\)/$TAG$/' > $TEMP.1 mv $TEMP.1 $TEMP done < $PATTERNS Plus for the other file and the comparison of the two temporary results. > Don't know if it makes sense since I've invented some > conventions. Like using the @ to denote it's followed by a > number indicating the numer of occurrences of the previous > pattern. Look at "man 7 re_format" :) There's some [0-9]{4} notion. The thing is referred to as a "bound". virtually yours 82D1 9B9C 01DC 4FB4 D7B4 61BE 3F49 4F77 72DE DA76 Gerhard Sittig true | mail -s "get gpg key" Gerhard.Sittig@gmx.net -- If you don't understand or are scared by any of the above ask your parents or an adult to help you. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message