Displays identifying information in files.
what [ -s ] File ...
The what command searches specified files for all occurrences of the pattern that the get command substitutes for the @(#) keyletter (see the get or prs command for a description of identification keywords). By convention, the value substituted is "@(#)" (double quotation marks, at sign, left parenthesis, pound sign, right parenthesis, double quotation marks). If no file is specified, the what command reads from standard input.
The what command writes to standard output whatever follows the pattern, up to but not including the first double quotation mark ("), greater than symbol (>), new-line character, backslash (\), or null character.
The what command should be used 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.
Note: The what command may fail to find SCCS identification strings in executable files.
-s | Searches for only the first occurrence of the @(#) pattern. |
This command returns the
following exit values:
0 | Any matches were found. |
1 | Otherwise. |
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, then the command:
what test.c test.o
test.c: Test Program test.o: Test Program
/usr/bin/what | Contains the what command. |
The get command, sccshelp command.
The sccsfile file format.
List of SCCS Commands in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.
Source Code Control System (SCCS) Overview in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.