rcs script help

Chris F.A. Johnson c.f.a.johnson-bJEeYj9oJeDQT0dZR+AlfA at public.gmane.org
Fri Jan 16 19:19:36 UTC 2004


On Fri, 16 Jan 2004, Matthew Willis wrote:

> Does anyone know where I can find a perl or bash
> script that will decorate an RCS controlled file so
> that each line has a prefix with username and version
> number?
>
> I've seen scripts to do this at places I've worked.
> But I can't find anything like it on google (the
> closest I found - whodunit.pl - a script to solve a
> murder mystery). In case it's not clear, I am thinking
> of output of the form:
>
> $ whodunnit foo.c
>
> mwillis 1.1 #include <stdio.h>
> mwillis 1.2 #include <math.h>
> mwillis 1.1
> mwillis 1.1 int main() {
> mwillis 1.1    double x; dvader  1.3    /* I M YR FTHR */
> mwillis 1.1    x = sin(1.2345);
> mwillis 1.2    printf("%f\n",x);
> mwillis 1.1    return 0;
> mwillis 1.1 }
>
> Before I end up writing this myself, I figured that
> somebody on tlug might remember a link?

name=$USER
version=1.2
sed "s/^/$name $version /" FILE > tempfile &&
 mv tempfile FILE

-- 
	Chris F.A. Johnson
	=================================================================
	cfaj-uVmiyxGBW52XDw4h08c5KA at public.gmane.org                      http://cfaj.freeshell.org
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list