what(1) — Commands
OSF
NAME
what − Displays identifying information for Source Code Control System (SCCS) files
SYNOPSIS
what [-s] file ...
The what command searches the named file for all occurrences of the pattern that get(1) substitutes for the %Z% keyletter.
FLAGS
-sSearches for just the first occurrence of @(#).
DESCRIPTION
By convention, the value substituted by get(1) for the %Z% keyletter is @(#). (See the get(1) command or the prs(1) command for a description of identification keywords.)
The what command writes to standard output whatever follows the pattern up to but not including the first " (double quote), > (redirection symbol), newline character, \ (backslash), or null character. If you specify more than one file, each line of output is preceded by the name of the file it is read from; otherwise, the filename is not displayed. If no file is specified, what reads from standard input.
The what command is intended for use in conjunction with the get command, which automatically inserts the identifying information. You can also use the what command on files where the information is inserted manually.
EXAMPLES
Suppose that the file test.c contains a C program that includes the line:
char ident[ ] = "@(#)Test Program";
If you compile test.c to produce test.o and a.out, then entering the command:
what test.c test.o a.out
displays:
test.c:
Test Program
test.o:
Test Program
a.out:
Test Program
RELATED INFORMATION
Commands: admin(1), cdc(1), comb(1), delta(1), get(1), prs(1), rmdel(1), sact(1), sccsdiff(1), sccshelp(1), unget(1), val(1).
Files: sccsfile(4).
Guide to Programming Support Tools