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

tabs.1p (8708B)


  1. '\" et
  2. .TH TABS "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. tabs
  12. \(em set terminal tabs
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. tabs \fB[\fR-\fIn\fP|-a|-a2|-c|-c2|-c3|-f|-p|-s|-u\fB] [\fR-T \fItype\fB]\fR
  17. .P
  18. tabs \fB[\fR-T \fItype\fB] \fIn\fB[[\fIsep\fB[\fR+\fB]\fIn\fB]\fR...\fB]\fR
  19. .fi
  20. .SH DESCRIPTION
  21. The
  22. .IR tabs
  23. utility shall display a series of characters that first clears the
  24. hardware terminal tab settings and then initializes the tab stops at
  25. the specified positions
  26. and optionally adjusts the margin.
  27. .P
  28. The phrase ``tab-stop position
  29. .IR N ''
  30. shall be taken to mean that, from the start of a line of output,
  31. tabbing to position
  32. .IR N
  33. shall cause the next character output to be in the (\c
  34. .IR N +1)th
  35. column position on that line. The maximum number of tab stops allowed
  36. is terminal-dependent.
  37. .P
  38. It need not be possible to implement
  39. .IR tabs
  40. on certain terminals. If the terminal type obtained from the
  41. .IR TERM
  42. environment variable or
  43. .BR \-T
  44. option represents such a terminal, an appropriate diagnostic message
  45. shall be written to standard error and
  46. .IR tabs
  47. shall exit with a status greater than zero.
  48. .SH OPTIONS
  49. The
  50. .IR tabs
  51. utility shall conform to the Base Definitions volume of POSIX.1\(hy2017,
  52. .IR "Section 12.2" ", " "Utility Syntax Guidelines",
  53. except for various extensions: the options
  54. .BR \-a2 ,
  55. .BR \-c2 ,
  56. and
  57. .BR \-c3
  58. are multi-character.
  59. .P
  60. The following options shall be supported:
  61. .IP "\fB\-\fIn\fR" 10
  62. Specify repetitive tab stops separated by a uniform number of column
  63. positions,
  64. .IR n ,
  65. where
  66. .IR n
  67. is a single-digit decimal number. The default usage of
  68. .IR tabs
  69. with no arguments shall be equivalent to
  70. .IR tabs
  71. \-8. When
  72. .BR \-0
  73. is used, the tab stops shall be cleared and no new ones set.
  74. .IP "\fB\-a\fP" 10
  75. 1,10,16,36,72
  76. .br
  77. Assembler, applicable to some mainframes.
  78. .IP "\fB\-a2\fP" 10
  79. 1,10,16,40,72
  80. .br
  81. Assembler, applicable to some mainframes.
  82. .IP "\fB\-c\fP" 10
  83. 1,8,12,16,20,55
  84. .br
  85. COBOL, normal format.
  86. .IP "\fB\-c2\fP" 10
  87. 1,6,10,14,49
  88. .br
  89. COBOL, compact format (columns 1 to 6 omitted).
  90. .IP "\fB\-c3\fP" 10
  91. 1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67
  92. .br
  93. COBOL compact format (columns 1 to 6 omitted), with more tabs than
  94. .BR \-c2 .
  95. .IP "\fB\-f\fP" 10
  96. 1,7,11,15,19,23
  97. .br
  98. FORTRAN
  99. .IP "\fB\-p\fP" 10
  100. 1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61
  101. .br
  102. PL/1
  103. .IP "\fB\-s\fP" 10
  104. 1,10,55
  105. .br
  106. SNOBOL
  107. .IP "\fB\-u\fP" 10
  108. 1,12,20,44
  109. .br
  110. Assembler, applicable to some mainframes.
  111. .IP "\fB\-T\ \fItype\fR" 10
  112. Indicate the type of terminal. If this option is not supplied and the
  113. .IR TERM
  114. variable is unset or null, an unspecified default terminal type shall
  115. be used. The setting of
  116. .IR type
  117. shall take precedence over the value in
  118. .IR TERM .
  119. .SH OPERANDS
  120. The following operand shall be supported:
  121. .IP "\fIn\fB[[\fIsep\fB[\fR+\fB]\fIn\fB]\fR...\fB]\fR" 10
  122. A single command line argument that consists of one or more tab-stop
  123. values (\c
  124. .IR n )
  125. separated by a separator character (\c
  126. .IR sep )
  127. which is either a
  128. <comma>
  129. or a
  130. <blank>
  131. character. The application shall ensure that the tab-stop values are
  132. positive decimal integers in strictly ascending order. If any tab-stop
  133. value (except the first one) is preceded by a
  134. <plus-sign>,
  135. it is taken as an increment to be added to the previous value. For
  136. example, the tab lists 1,10,20,30 and
  137. .BR \(dq1 10 +10 +10\(dq
  138. are considered to be identical.
  139. .SH STDIN
  140. Not used.
  141. .SH "INPUT FILES"
  142. None.
  143. .SH "ENVIRONMENT VARIABLES"
  144. The following environment variables shall affect the execution of
  145. .IR tabs :
  146. .IP "\fILANG\fP" 10
  147. Provide a default value for the internationalization variables that are
  148. unset or null. (See the Base Definitions volume of POSIX.1\(hy2017,
  149. .IR "Section 8.2" ", " "Internationalization Variables"
  150. for the precedence of internationalization variables used to determine
  151. the values of locale categories.)
  152. .IP "\fILC_ALL\fP" 10
  153. If set to a non-empty string value, override the values of all the
  154. other internationalization variables.
  155. .IP "\fILC_CTYPE\fP" 10
  156. Determine the locale for the interpretation of sequences of bytes of
  157. text data as characters (for example, single-byte as opposed to
  158. multi-byte characters in arguments).
  159. .IP "\fILC_MESSAGES\fP" 10
  160. .br
  161. Determine the locale that should be used to affect the format and
  162. contents of diagnostic messages written to standard error.
  163. .IP "\fINLSPATH\fP" 10
  164. Determine the location of message catalogs for the processing of
  165. .IR LC_MESSAGES .
  166. .IP "\fITERM\fP" 10
  167. Determine the terminal type. If this variable is unset or null, and if
  168. the
  169. .BR \-T
  170. option is not specified, an unspecified default terminal type shall be
  171. used.
  172. .SH "ASYNCHRONOUS EVENTS"
  173. Default.
  174. .SH STDOUT
  175. If standard output is a terminal, the appropriate sequence to clear and
  176. set the tab stops may be written to standard output in an unspecified
  177. format. If standard output is not a terminal, undefined results
  178. occur.
  179. .SH STDERR
  180. The standard error shall be used only for diagnostic messages.
  181. .SH "OUTPUT FILES"
  182. None.
  183. .SH "EXTENDED DESCRIPTION"
  184. None.
  185. .SH "EXIT STATUS"
  186. The following exit values shall be returned:
  187. .IP "\00" 6
  188. Successful completion.
  189. .IP >0 6
  190. An error occurred.
  191. .SH "CONSEQUENCES OF ERRORS"
  192. Default.
  193. .LP
  194. .IR "The following sections are informative."
  195. .SH "APPLICATION USAGE"
  196. This utility makes use of the terminal's hardware tabs and the
  197. .IR stty
  198. .IR tabs
  199. option.
  200. .P
  201. This utility is not recommended for application use.
  202. .P
  203. Some integrated display units might not have escape sequences to set
  204. tab stops, but may be set by internal system calls. On these
  205. terminals,
  206. .IR tabs
  207. works if standard output is directed to the terminal; if output is
  208. directed to another file, however,
  209. .IR tabs
  210. fails.
  211. .SH EXAMPLES
  212. None.
  213. .SH RATIONALE
  214. Consideration was given to having the
  215. .IR tput
  216. utility handle all of the functions described in
  217. .IR tabs .
  218. However, the separate
  219. .IR tabs
  220. utility was retained because it seems more intuitive to use a command
  221. named
  222. .IR tabs
  223. than
  224. .IR tput
  225. with a new option. The
  226. .IR tput
  227. utility does not support setting or clearing tabs, and no known
  228. historical version of
  229. .IR tabs
  230. supports the capability of setting arbitrary tab stops.
  231. .P
  232. The System V
  233. .IR tabs
  234. interface is very complex; the version in this volume of POSIX.1\(hy2017 has a reduced feature
  235. list, but many of the features omitted were restored as part of the
  236. XSI option even though the supported languages and coding styles are
  237. primarily historical.
  238. .P
  239. There was considerable sentiment for specifying only a means of
  240. resetting the tabs back to a known state\(empresumably the ``standard''
  241. of tabs every eight positions. The following features were omitted:
  242. .IP " *" 4
  243. Setting tab stops via the first line in a file, using \-\|\-\c
  244. .IR file .
  245. Since even the SVID has no complete explanation of this feature, it is
  246. doubtful that it is in widespread use.
  247. .P
  248. In an early proposal, a
  249. .BR \-t
  250. .IR tablist
  251. option was added for consistency with
  252. .IR expand ;
  253. this was later removed when inconsistencies with the historical list of
  254. tabs were identified.
  255. .P
  256. Consideration was given to adding a
  257. .BR \-p
  258. option that would output the current tab settings so that they could be
  259. saved and then later restored. This was not accepted because querying
  260. the tab stops of the terminal is not a capability in historical
  261. .IR terminfo
  262. or
  263. .IR termcap
  264. facilities and might not be supported on a wide range of terminals.
  265. .SH "FUTURE DIRECTIONS"
  266. None.
  267. .SH "SEE ALSO"
  268. .IR "\fIexpand\fR\^",
  269. .IR "\fIstty\fR\^",
  270. .IR "\fItput\fR\^",
  271. .IR "\fIunexpand\fR\^"
  272. .P
  273. The Base Definitions volume of POSIX.1\(hy2017,
  274. .IR "Chapter 8" ", " "Environment Variables",
  275. .IR "Section 12.2" ", " "Utility Syntax Guidelines"
  276. .\"
  277. .SH COPYRIGHT
  278. Portions of this text are reprinted and reproduced in electronic form
  279. from IEEE Std 1003.1-2017, Standard for Information Technology
  280. -- Portable Operating System Interface (POSIX), The Open Group Base
  281. Specifications Issue 7, 2018 Edition,
  282. Copyright (C) 2018 by the Institute of
  283. Electrical and Electronics Engineers, Inc and The Open Group.
  284. In the event of any discrepancy between this version and the original IEEE and
  285. The Open Group Standard, the original IEEE and The Open Group Standard
  286. is the referee document. The original Standard can be obtained online at
  287. http://www.opengroup.org/unix/online.html .
  288. .PP
  289. Any typographical or formatting errors that appear
  290. in this page are most likely
  291. to have been introduced during the conversion of the source files to
  292. man page format. To report such errors, see
  293. https://www.kernel.org/doc/man-pages/reporting_bugs.html .