Name
what - identify SCCS files
Syntax
what [-s] files
Description
The what command searches the given files for all
occurrences of the pattern that get(CP) substitutes for %Z%
(this is @(#) at this printing) and prints out what follows
until the first ~, >, new-line, \, or null character. For
example, if the C program in file f.c contains
char ident[] = "@(#)identification information";
and f.c is compiled to yield f.o and a.out, then the command
what f.c f.o a.out
will print
f.c: identification information
f.o: identification information
a.out: identification information
The what command is intended to be used in conjunction with
the command get(CP), which automatically inserts
identifying information, but it can also be used where the
information is inserted manually. Only one option exists:
-s Quit after finding the first occurrence of
pattern in each file.
See Also
get(CP).
Diagnostics
Exit status is 0 if any matches are found, otherwise 1.
Notes
It is possible that an unintended occurrence of the pattern
@(#) could be found just by chance, but this causes no harm
in nearly all cases.
Standards Conformance
what is conformant with:
AT&T SVID Issue 2, Select Code 307-127;
and The X/Open Portability Guide II of January 1987.
(printed 6/18/89)