what(C)
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% (@(#)) and prints out what follows
until the first occurrence of any of the following: ", >, new-line,
\, or null character. For example, assuming that a C program in
file f.c contains:
char ident[] = "@(#)identification information";
If f.c is compiled to yield f.o and
a.out, then the command:
what -s 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 SCCS get command which automatically
inserts identifying information, but it can also be used where the
information is inserted manually. Only one option is accepted:
-s-
Quit after finding the first occurrence of pattern in each file.
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.
See also
get(CP)
Standards conformance
what is conformant with:
ISO/IEC DIS 99452:1992, Information technology Portable Operating System Interface (POSIX) Part 2: Shell and Utilities (IEEE Std 1003.21992);
AT&T SVID Issue 2;
X/Open CAE Specification, Commands and Utilities, Issue 4, 1992.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005