Current File : //usr/share/man/zh_CN.UTF-8/man1/what.1
'\" te
.\" Copyright (c) 2002, 2011, Oracle and/or its affiliates.All rights reserved.
.\" Copyright 1989 AT&T
.TH what 1 "2011 年 3 月 23 日" "SunOS 5.11" "用户命令"
.SH 名称
what \- 从文件中提取 SCCS 版本信息
.SH 用法概要
.LP
.nf
\fBwhat\fR [\fB-s\fR] \fIfilename\fR...
.fi

.SH 描述
.sp
.LP
\fBwhat\fR 实用程序可从每个 \fIfilename\fR 中搜索 \fBSCCS\fR \fBget\fR 命令(请参见 \fBsccs-get\fR(1))来替换 \fB@(#)\fR ID 关键字的字样 \fB@(#)\fR,并输出 \fB"\fR、\fB>\fR、\fB换行\fR、\fB\\fR 或\fB空\fR字符后跟的内容。
.SH 选项
.sp
.LP
支持以下选项:
.sp
.ne 2
.mk
.na
\fB\fB-s\fR\fR
.ad
.RS 6n
.rt  
第一次出现字样后停止。
.RE

.SH 示例
.LP
\fB示例 1 \fR提取 SCCS 版本信息
.sp
.LP
如果文件 \fBprogram.c\fR 中的 C 程序包含

.sp
.in +2
.nf
char sccsid[\|] = "\|@(#)identification information\|";
.fi
.in -2
.sp

.sp
.LP
并且将 \fBprogram.c\fR 编译为生成 \fBprogram.o\fR 和 \fBa.out\fR,则命令:

.sp
.in +2
.nf
example% \fBwhat program.c program.o a.out\fR
.fi
.in -2
.sp

.sp
.LP
生成:

.sp
.ne 2
.mk
.na
\fB\fBprogram.c\fR:\fR
.ad
.RS 16n
.rt  
标识信息
.RE

.sp
.ne 2
.mk
.na
\fB\fBprogram.o\fR:\fR
.ad
.RS 16n
.rt  
标识信息
.RE

.sp
.ne 2
.mk
.na
\fB\fBa.out\fR:\fR
.ad
.RS 16n
.rt  
标识信息
.RE

.SH 退出状态
.sp
.LP
将返回以下退出值:
.sp
.ne 2
.mk
.na
\fB\fB0\fR\fR
.ad
.RS 5n
.rt  
找到了匹配项。
.RE

.sp
.ne 2
.mk
.na
\fB\fB1\fR\fR
.ad
.RS 5n
.rt  
未找到匹配项。
.RE

.SH 环境变量
.sp
.LP
有关影响 \fBwhat\fR 执行的环境变量 \fBLANG\fR、\fBLC_ALL\fR、\fBLC_CTYPE\fR、\fBLC_MESSAGES\fR 和 \fBNLSPATH\fR 的说明,请参见 \fBenviron\fR(5)。
.SH 属性
.sp
.LP
有关下列属性的说明,请参见 \fBattributes\fR(5):
.sp

.sp
.TS
tab() box;
cw(2.75i) |cw(2.75i) 
lw(2.75i) |lw(2.75i) 
.
属性类型属性值
_
可用性developer/build/make
_
接口稳定性Committed(已确定)
_
标准请参见 \fBstandards\fR(5)。
.TE

.SH 另请参见
.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 诊断
.sp
.LP
有关 SCCS 命令的说明,请使用 \fBsccs-help\fR 命令。请参见 \fBsccs-help\fR(1)。
.SH 已知问题
.sp
.LP
\fBwhat\fR 可以找到欺骗性出现的 \fB@(#)\fR 字样的可能性极小。