what - extract version information from a file
-s ] filename ...
what searches each filename for occurrences of the pattern @(#) that the SCCS get command substitutes for the %Z% ID keyword, and prints what follows up to a ", >, NEWLINE, \, or null character. What can be used on any type of file, NOT just SCCS files. Just put the magic 4 character @(#) pattern in your file and you are set.
-s Stop after the first occurrence of the pattern.
The working of what is not influenced by any environment variables.
If a Perl program test1.pl contains:
my $REV = '@(# ) $Revision: 1.3 ...
and a C program test2.c contains:
char rcsid = "@(# ) $Revision: 1.15 ....
and the C program is compiled to a.out...
prompt%> what test1.pl test2.c a.out
test1.pl: $Revision: 1.3 $';
test2.c: $Revision: 1.15 $";
a.out; $Revision: 1.15 $
what has no known bugs.
$Log: what,v $ Revision 1.2 2004/08/05 14:17:44 cwest cleanup, new version number on website
Revision 1.1 2004/07/23 20:10:21 cwest initial import Revision 1.2 1999/03/28 06:28:47 schumacks Handles binary files better
Revision 1.1 1999/03/23 10:57:39 schumacks Initial revision
$Revision: 1.2 $
This Perl implementation of what was written by Ken Schumack firstname.lastname@example.org
This program is copyright by Ken Schumack 1999.
This program is free and open software. You may use, modify, distribute and sell this program (and any modified variants) in any way you wish, provided you do not restrict others from doing the same.