On Tuesday 13 November 2001 07:30, Avrahami, David pronounced:
> Hi
> In digital unix I use "what" command with this printout:
> trm245 # what /bin/ls
> /bin/ls:
> $RCSfile: crt0.s,v $ $Revision: 1.1.21.11 $ (DEC) $Date:
1995/09/06
> 19:5
> 4:27 $
> $RCSfile: ls.c,v $ $Revision: 4.3.23.6 $ (OSF) $Date: 1995/12/18
> 04:11:0
> 0 $
>
> Do you know which command replace it in Linux?
> David Avrahami
> Email: [EMAIL PROTECTED]
>
>>On Thursday, November 15, 2001 6:11 AM Allen Wayne Best wrote:
>>we ran into the same problem when we ported some hpux programs to linux.
what
>>we did is made a perl wrapper for the string command. a simple way to do
not
>>write a perl program is to
>>strings filename | grep '\$Revision:'
>>for instance, i put your message into a file named test and ran the above
>>againt it:
>>$ strings test | grep '\$Revision'
>> $RCSfile: crt0.s,v $ $Revision: 1.1.21.11 $ (DEC) $Date:
1995/09/06
>> $RCSfile: ls.c,v $ $Revision: 4.3.23.6 $ (OSF) $Date: 1995/12/18
>>hope this helps...
Another way to do it (thanks to Matthew Melvin
[[EMAIL PROTECTED]]):
The ident command (which is part of the RCS package) can be used to extract
keywords and their values from a file. This can be handy for text files, but
it is even more useful for extracting keywords from binary files.
$ ident samp.c
samp.c:
$Id: samp.c,v 1.5 1993/10/19 14:57:32 ceder Exp $
$ gcc samp.c
$ ident a.out
a.out:
$Id: samp.c,v 1.5 1993/10/19 14:57:32 ceder Exp $
SCCS is another popular revision control system. It has a command, what,
which is very similar to ident and used for the same purpose. Many sites
without RCS have SCCS. Since what looks for the character sequence @(#) it
is easy to include keywords that are detected by either command. Simply
prefix the RCS keyword with the magic SCCS phrase, like this:
static char *id="@(#) $Id: ab.c,v 1.5 1993/10/19 14:57:32 ceder Exp $";
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list