logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

what.1p (4808B)


  1. '\" et
  2. .TH WHAT "1P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. what
  12. \(em identify SCCS files (\fBDEVELOPMENT\fP)
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. what \fB[\fR-s\fB] \fIfile\fR...
  17. .fi
  18. .SH DESCRIPTION
  19. The
  20. .IR what
  21. utility shall search the given files for all occurrences of the pattern
  22. that
  23. .IR get
  24. (see
  25. .IR "\fIget\fR\^")
  26. substitutes for the %\fBZ\fP% keyword (\c
  27. .BR \(dq@(#)\(dq )
  28. and shall write to standard output what follows until the first
  29. occurrence of one of the following:
  30. .sp
  31. .RS 4
  32. .nf
  33. \&" > newline \e NUL
  34. .fi
  35. .P
  36. .RE
  37. .SH OPTIONS
  38. The
  39. .IR what
  40. utility shall conform to the Base Definitions volume of POSIX.1\(hy2017,
  41. .IR "Section 12.2" ", " "Utility Syntax Guidelines".
  42. .P
  43. The following option shall be supported:
  44. .IP "\fB\-s\fP" 10
  45. Quit after finding the first occurrence of the pattern in each file.
  46. .SH OPERANDS
  47. The following operands shall be supported:
  48. .IP "\fIfile\fR" 10
  49. A pathname of a file to search.
  50. .SH STDIN
  51. Not used.
  52. .SH "INPUT FILES"
  53. The input files shall be of any file type.
  54. .SH "ENVIRONMENT VARIABLES"
  55. The following environment variables shall affect the execution of
  56. .IR what :
  57. .IP "\fILANG\fP" 10
  58. Provide a default value for the internationalization variables that are
  59. unset or null. (See the Base Definitions volume of POSIX.1\(hy2017,
  60. .IR "Section 8.2" ", " "Internationalization Variables"
  61. for the precedence of internationalization variables used to determine
  62. the values of locale categories.)
  63. .IP "\fILC_ALL\fP" 10
  64. If set to a non-empty string value, override the values of all the
  65. other internationalization variables.
  66. .IP "\fILC_CTYPE\fP" 10
  67. Determine the locale for the interpretation of sequences of bytes of
  68. text data as characters (for example, single-byte as opposed to
  69. multi-byte characters in arguments and input files).
  70. .IP "\fILC_MESSAGES\fP" 10
  71. .br
  72. Determine the locale that should be used to affect the format and
  73. contents of diagnostic messages written to standard error.
  74. .IP "\fINLSPATH\fP" 10
  75. Determine the location of message catalogs for the processing of
  76. .IR LC_MESSAGES .
  77. .SH "ASYNCHRONOUS EVENTS"
  78. Default.
  79. .SH STDOUT
  80. The standard output shall consist of the following for each
  81. .IR file
  82. operand:
  83. .sp
  84. .RS 4
  85. .nf
  86. "%s:\en\et%s\en", <\fIpathname\fR>, <\fIidentification string\fR>
  87. .fi
  88. .P
  89. .RE
  90. .SH STDERR
  91. The standard error shall be used only for diagnostic messages.
  92. .SH "OUTPUT FILES"
  93. None.
  94. .SH "EXTENDED DESCRIPTION"
  95. None.
  96. .SH "EXIT STATUS"
  97. The following exit values shall be returned:
  98. .IP 0 6
  99. Any matches were found.
  100. .IP 1 6
  101. Otherwise.
  102. .SH "CONSEQUENCES OF ERRORS"
  103. Default.
  104. .LP
  105. .IR "The following sections are informative."
  106. .SH "APPLICATION USAGE"
  107. The
  108. .IR what
  109. utility is intended to be used in conjunction with the SCCS command
  110. .IR get ,
  111. which automatically inserts identifying information, but it can also be
  112. used where the information is inserted by any other means.
  113. .P
  114. When the string
  115. .BR \(dq@(#)\(dq
  116. is included in a library routine in a shared library, it might not be
  117. found in an
  118. .BR a.out
  119. file using that library routine.
  120. .SH EXAMPLES
  121. If the C-language program in file
  122. .BR f.c
  123. contains:
  124. .sp
  125. .RS 4
  126. .nf
  127. char ident[] = "@(#)identification information";
  128. .fi
  129. .P
  130. .RE
  131. .P
  132. and
  133. .BR f.c
  134. is compiled to yield
  135. .BR f.o
  136. and
  137. .BR a.out ,
  138. then the command:
  139. .sp
  140. .RS 4
  141. .nf
  142. what f.c f.o a.out
  143. .fi
  144. .P
  145. .RE
  146. .P
  147. writes:
  148. .sp
  149. .RS 4
  150. .nf
  151. f.c:
  152. identification information
  153. ...
  154. f.o:
  155. identification information
  156. ...
  157. a.out:
  158. identification information
  159. ...
  160. .fi
  161. .P
  162. .RE
  163. .SH RATIONALE
  164. None.
  165. .SH "FUTURE DIRECTIONS"
  166. None.
  167. .SH "SEE ALSO"
  168. .IR "\fIget\fR\^"
  169. .P
  170. The Base Definitions volume of POSIX.1\(hy2017,
  171. .IR "Chapter 8" ", " "Environment Variables",
  172. .IR "Section 12.2" ", " "Utility Syntax Guidelines"
  173. .\"
  174. .SH COPYRIGHT
  175. Portions of this text are reprinted and reproduced in electronic form
  176. from IEEE Std 1003.1-2017, Standard for Information Technology
  177. -- Portable Operating System Interface (POSIX), The Open Group Base
  178. Specifications Issue 7, 2018 Edition,
  179. Copyright (C) 2018 by the Institute of
  180. Electrical and Electronics Engineers, Inc and The Open Group.
  181. In the event of any discrepancy between this version and the original IEEE and
  182. The Open Group Standard, the original IEEE and The Open Group Standard
  183. is the referee document. The original Standard can be obtained online at
  184. http://www.opengroup.org/unix/online.html .
  185. .PP
  186. Any typographical or formatting errors that appear
  187. in this page are most likely
  188. to have been introduced during the conversion of the source files to
  189. man page format. To report such errors, see
  190. https://www.kernel.org/doc/man-pages/reporting_bugs.html .