'\" te .\" Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. .\" Copyright 1989 AT&T .TH what 1 "23 Mar 2011" "SunOS 5.11" "User Commands" .SH NAME what \- extract SCCS version information from a file .SH SYNOPSIS .LP .nf \fBwhat\fR [\fB-s\fR] \fIfilename\fR... .fi .SH DESCRIPTION .sp .LP The \fBwhat\fR utility searches each \fIfilename\fR for occurrences of the pattern \fB@(#)\fR that the \fBSCCS\fR \fBget\fR command (see \fBsccs-get\fR(1)) substitutes for the \fB@(#)\fR ID keyword, and prints what follows up to a \fB"\fR, \fB>\fR, \fBNEWLINE\fR, \fB\e\fR, or \fBNULL\fR character. .SH OPTIONS .sp .LP The following option is supported: .sp .ne 2 .mk .na \fB\fB-s\fR\fR .ad .RS 6n .rt Stops after the first occurrence of the pattern. .RE .SH EXAMPLES .LP \fBExample 1 \fRExtracting SCCS version information .sp .LP If a C program in file \fBprogram.c\fR contains .sp .in +2 .nf char sccsid[\|] = "\|@(#)identification information\|"; .fi .in -2 .sp .sp .LP and \fBprogram.c\fR is compiled to yield \fBprogram.o\fR and \fBa.out\fR, the command: .sp .in +2 .nf example% \fBwhat program.c program.o a.out\fR .fi .in -2 .sp .sp .LP produces: .sp .ne 2 .mk .na \fB\fBprogram.c\fR:\fR .ad .RS 14n .rt identification information .RE .sp .ne 2 .mk .na \fB\fBprogram.o\fR:\fR .ad .RS 14n .rt identification information .RE .sp .ne 2 .mk .na \fB\fBa.out\fR:\fR .ad .RS 14n .rt identification information .RE .SH EXIT STATUS .sp .LP The following exit values are returned: .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .RS 5n .rt Any matches were found. .RE .sp .ne 2 .mk .na \fB\fB1\fR\fR .ad .RS 5n .rt No matches found. .RE .SH ENVIRONMENT VARIABLES .sp .LP See \fBenviron\fR(5) for descriptions of the following environment variables that affect the execution of \fBwhat\fR: \fBLANG\fR, \fBLC_ALL\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitydeveloper/build/make _ Interface StabilityCommitted _ StandardSee \fBstandards\fR(5). .TE .SH SEE ALSO .sp .LP \fBsccs\fR(1), \fBsccs-admin\fR(1), \fBsccs-cdc\fR(1), \fBsccs-comb\fR(1), \fBsccs-delta\fR(1), \fBsccs-get\fR(1), \fBsccs-help\fR(1), \fBsccs-prs\fR(1), \fBsccs-prt\fR(1), \fBsccs-rmdel\fR(1), \fBsccs-sact\fR(1), \fBsccs-sccsdiff\fR(1), \fBsccs-unget\fR(1), \fBsccs-val\fR(1), \fBsccsfile\fR(4), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5) .SH DIAGNOSTICS .sp .LP Use the \fBsccs-help\fR command for explanations of SCCS commands. See \fBsccs-help\fR(1). .SH BUGS .sp .LP There is a remote possibility that a spurious occurrence of the \fB@(#)\fR pattern could be found by \fBwhat\fR.