home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / info / sh-utils.info (.txt) < prev    next >
GNU Info File  |  1994-12-22  |  96KB  |  2,065 lines

  1. This is Info file sh-utils.info, produced by Makeinfo-1.55 from the
  2. input file sh-utils.texi.
  3. START-INFO-DIR-ENTRY
  4. * Shell utilities: (sh-utils).        GNU shell utilities.
  5. * basename: (sh-utils)basename invocation.    Strip directory and suffix.
  6. * date: (sh-utils)date invocation.        Print/set system date and time.
  7. * dirname: (sh-utils)dirname invocation.    Strip non-directory suffix.
  8. * echo: (sh-utils)echo invocation.        Print a line of text.
  9. * env: (sh-utils)env invocation.        Modify the environment.
  10. * expr: (sh-utils)expr invocation.        Evaluate expressions.
  11. * false: (sh-utils)false invocation.        Do nothing, unsuccessfully.
  12. * groups: (sh-utils)groups invocation.        Print group names a user is in.
  13. * hostname: (sh-utils)hostname invocation.    Print or set system name.
  14. * id: (sh-utils)id invocation.            Print real/effective uid/gid.
  15. * logname: (sh-utils)logname invocation.    Print current login name.
  16. * nice: (sh-utils)nice invocation.        Modify scheduling priority.
  17. * pathchk: (sh-utils)pathchk invocation.    Check file name portability.
  18. * printenv: (sh-utils)printenv invocation.    Print environment variables.
  19. * printf: (sh-utils)printf invocation.            Format and print data.
  20. * pwd: (sh-utils)pwd invocation.            Print working directory.
  21. * sleep: (sh-utils)sleep invocation.            Delay for a specified time.
  22. * stty: (sh-utils)stty invocation.            Print/change terminal settings.
  23. * su: (sh-utils)su invocation.                    Modify user and group id.
  24. * tee: (sh-utils)tee invocation.            Redirect to multiple files.
  25. * test: (sh-utils)test invocation.            File/string tests.
  26. * true: (sh-utils)true invocation.            Do nothing, successfully.
  27. * tty: (sh-utils)tty invocation.            Print terminal name.
  28. * uname: (sh-utils)uname invocation.            Print system information.
  29. * users: (sh-utils)users invocation.            Print current user names.
  30. * who: (sh-utils)who invocation.            Print who is logged in.
  31. * whoami: (sh-utils)whoami invocation.        Print effective user id.
  32. * yes: (sh-utils)yes invocation.        Print a string indefinitely.
  33. END-INFO-DIR-ENTRY
  34.    This file documents the GNU shell utilities.
  35.    Copyright (C) 1994 Free Software Foundation, Inc.
  36.    Permission is granted to make and distribute verbatim copies of this
  37. manual provided the copyright notice and this permission notice are
  38. preserved on all copies.
  39.    Permission is granted to copy and distribute modified versions of
  40. this manual under the conditions for verbatim copying, provided that
  41. the entire resulting derived work is distributed under the terms of a
  42. permission notice identical to this one.
  43.    Permission is granted to copy and distribute translations of this
  44. manual into another language, under the above conditions for modified
  45. versions, except that this permission notice may be stated in a
  46. translation approved by the Foundation.
  47. File: sh-utils.info,  Node: Top,  Next: Introduction,  Prev: (DIR),  Up: (DIR)
  48. GNU shell utilities
  49. *******************
  50.    This manual minimally documents version GNU sh-utils 1.12 of the GNU
  51. shell utilities.
  52. * Menu:
  53. * Introduction::        Caveats, overview, and authors.
  54. * Common options::              Common options.
  55. * Printing text::               echo printf yes
  56. * Conditions::                  false true test expr
  57. * Redirection::                 tee
  58. * File name manipulation::      dirname basename pathchk
  59. * Working context information:: pwd stty printenv tty
  60. * User information::            id logname whoami groups users who
  61. * System context::              date uname hostname
  62. * Modified command invocation:: env nice nohup su
  63. * Delaying::                    sleep
  64. * Index::                       General index.
  65. File: sh-utils.info,  Node: Introduction,  Next: Common options,  Prev: Top,  Up: Top
  66. Introduction
  67. ************
  68.    First of all, this manual is incomplete.  The `stty' section, in
  69. particular, needs substantial reorganization and additional explanatory
  70. text before it will be up to the standard of other GNU manuals.
  71. Explanatory text in general is lacking; the manual presently assumes you
  72. pretty much know what to do, and just need to be reminded of how.  Thus,
  73. if you are interested, please get involved in improving this manual.
  74. The entire GNU community will benefit.
  75.    Some of these programs are useful only when writing shell scripts;
  76. utilities like these are, in fact, the "language" of shell scripts (to
  77. a great extent).  Others are occasionally useful interactively.
  78.    The GNU shell utilities are mostly compatible with the POSIX.2
  79. standard.
  80.    Please report bugs to `bug-gnu-utils@prep.ai.mit.edu'.  Remember to
  81. include the version number, machine architecture, input files, and any
  82. other information needed to reproduce the bug.  *Note Bugs: (gcc)Bugs.
  83.    This manual is based on the Unix man pages in the distribution, which
  84. were originally written by David MacKenzie and updated by Jim Meyering.
  85. Franc,ois Pinard did the initial conversion to Texinfo format.  Karl
  86. Berry did the indexing, some reorganization, and editing of the results.
  87. Richard Stallman contributed his usual invaluable insights to the
  88. overall process.
  89. File: sh-utils.info,  Node: Common options,  Next: Printing text,  Prev: Introduction,  Up: Top
  90. Common options
  91. **************
  92.    Certain options are available in all these programs.  Rather than
  93. writing identical descriptions for each of the programs, they are
  94. described here.  (In fact, every GNU program accepts (or should accept)
  95. these options.)
  96.    Many of these programs take arbitrary strings as arguments.  In those
  97. cases, `--help' and `--version' are taken as these options only if
  98. there is one and exactly one command line argument.
  99. `--help'
  100.      Print a usage message listing all available options, then exit
  101.      successfully.
  102. `--version'
  103.      Print the version number, then exit successfully.
  104. File: sh-utils.info,  Node: Printing text,  Next: Conditions,  Prev: Common options,  Up: Top
  105. Printing text
  106. *************
  107.    This section describes commands that display text strings.
  108. * Menu:
  109. * echo invocation::             Print a line of text.
  110. * printf invocation::           Format and print data.
  111. * yes invocation::              Print a string until interrupted.
  112. File: sh-utils.info,  Node: echo invocation,  Next: printf invocation,  Up: Printing text
  113. `echo': Print a line of text
  114. ============================
  115.    Synopsis:
  116.      echo [ OPTION ]... [ STRING ]...
  117.    `echo' writes each given STRING to standard output, with a space
  118. between each and a newline after the last one.
  119.    The program accepts the following options.  Also see *Note Common
  120. options::.
  121.      Do not output the trailing newline.
  122.      Enable interpretation of the following backslash-escaped
  123.      characters in each STRING:
  124.     `\a'
  125.           alert (bell)
  126.     `\b'
  127.           backspace
  128.     `\c'
  129.           suppress trailing newline
  130.     `\f'
  131.           form feed
  132.     `\n'
  133.           new line
  134.     `\r'
  135.           carriage return
  136.     `\t'
  137.           horizontal tab
  138.     `\v'
  139.           vertical tab
  140.     `\\'
  141.           backslash
  142.     `\NNN'
  143.           the character whose ASCII code is NNN (octal); if NNN is not
  144.           a valid octal number, it is printed literally.
  145. File: sh-utils.info,  Node: printf invocation,  Next: yes invocation,  Prev: echo invocation,  Up: Printing text
  146. `printf': Format and print data
  147. ===============================
  148.    Synopsis:
  149.      printf FORMAT [ ARGUMENT ]...
  150.    `printf' prints the FORMAT string, interpreting `%' directives and
  151. `\' escapes in the same way as the C `printf' function.  The FORMAT
  152. argument is re-used as necessary to convert all of the given ARGUMENTs.
  153.    `printf' has one additional directive, `%b', which prints its
  154. argument string with `\' escapes interpreted in the same way as in the
  155. FORMAT string.
  156.    `printf' interprets `\0ooo' in FORMAT as an octal number (if OOO is
  157. 0 to 3 octal digits) specifying a character to print, and `\xhhh' as a
  158. hexadecimal number (if HHH is 1 to 3 hex digits) specifying a character
  159. to print.
  160.    An additional escape, `\c', causes `printf' to produce no further
  161. output.
  162.    The only options are a lone `--help' or `--version'.  *Note Common
  163. options::.
  164. File: sh-utils.info,  Node: yes invocation,  Prev: printf invocation,  Up: Printing text
  165. `yes': Print a string until interrupted
  166. =======================================
  167.    `yes' prints the command line arguments, separated by spaces and
  168. followed by a newline, forever until it is killed.  If no arguments are
  169. given, it prints `y' followed by a newline forever until killed.
  170.    The only options are a lone `--help' or `--version'.  *Note Common
  171. options::.
  172. File: sh-utils.info,  Node: Conditions,  Next: Redirection,  Prev: Printing text,  Up: Top
  173. Conditions
  174. **********
  175.    This section describes commands that are primarily useful for their
  176. exit status, rather than their output.  Thus, they are often used as the
  177. condition of shell `if' statements, or as the last command in a
  178. pipeline.
  179. * Menu:
  180. * false invocation::            Do nothing, unsuccessfully.
  181. * true invocation::             Do nothing, successfully.
  182. * test invocation::             Check file types and compare values.
  183. * expr invocation::             Evaluate expressions.
  184. File: sh-utils.info,  Node: false invocation,  Next: true invocation,  Up: Conditions
  185. `false': Do nothing, unsuccessfully
  186. ===================================
  187.    `false' does nothing except return an exit status of 1, meaning
  188. "failure".  It can be used as a place holder in shell scripts where an
  189. unsuccessful command is needed.
  190.    Any arguments are ignored, except for a lone `--help' or `--version'
  191. (*note Common options::.).
  192. File: sh-utils.info,  Node: true invocation,  Next: test invocation,  Prev: false invocation,  Up: Conditions
  193. `true': Do nothing, successfully
  194. ================================
  195.    `true' does nothing except return an exit status of 0, meaning
  196. "success".  It can be used as a place holder in shell scripts where a
  197. successful command is needed, although the shell built-in command `:'
  198. (colon) may be faster.
  199.    Any arguments are ignored, except for a lone `--help' or `--version'
  200. (*note Common options::.).
  201. File: sh-utils.info,  Node: test invocation,  Next: expr invocation,  Prev: true invocation,  Up: Conditions
  202. `test': Check file types and compare values
  203. ===========================================
  204.    `test' returns a status of 0 (true) or 1 (false) depending on the
  205. evaluation of the conditional expression EXPR.  Each part of the
  206. expression must be a separate argument.
  207.    `test' has file status checks, string operators, and numeric
  208. comparison operators.
  209.    Because most shells have a built-in command by the same name, using
  210. the unadorned command name in a script or interactively may get you
  211. different functionality than that described here.
  212.    Besides the options below, `test' accepts a lone `--help' or
  213. `--version'.  *Note Common options::.  A single non-option argument is
  214. also allowed: `test' returns true if the argument is not null.
  215. * Menu:
  216. * File type tests::             -[bcdfhLpSt]
  217. * Access permission tests::     -[gkruwxOG]
  218. * File characteristics tests::  -e -s -nt -ot -ef
  219. * String tests::                -z -n = !=
  220. * Numeric tests::               -eq -ne -lt -le -gt -ge
  221. * Connectives for test::        ! -a -o
  222. File: sh-utils.info,  Node: File type tests,  Next: Access permission tests,  Up: test invocation
  223. File type tests
  224. ---------------
  225.    These options test for particular types of files.  (Everything's a
  226. file, but not all files are the same!)
  227. `-b FILE'
  228.      True if FILE exists and is a block special device.
  229. `-c FILE'
  230.      True if FILE exists and is a character special device.
  231. `-d FILE'
  232.      True if FILE exists and is a directory.
  233. `-f FILE'
  234.      True if FILE exists and is a regular file.
  235. `-h FILE'
  236. `-L FILE'
  237.      True if FILE exists and is a symbolic link.
  238. `-p FILE'
  239.      True if FILE exists and is a named pipe.
  240. `-S FILE'
  241.      True if FILE exists and is a socket.
  242. `-t [ FD ]'
  243.      True if FD is opened on a terminal.  If FD is omitted, it defaults
  244.      to 1 (standard output).
  245. File: sh-utils.info,  Node: Access permission tests,  Next: File characteristics tests,  Prev: File type tests,  Up: test invocation
  246. Access permission tests
  247. -----------------------
  248.    These options test for particular access permissions.
  249. `-g FILE'
  250.      True if FILE exists and has its set-group-id bit set.
  251. `-k FILE'
  252.      True if FILE has its "sticky" bit set.
  253. `-r FILE'
  254.      True if FILE exists and is readable.
  255. `-u FILE'
  256.      True if FILE exists and has its set-user-id bit set.
  257. `-w FILE'
  258.      True if FILE exists and is writable.
  259. `-x FILE'
  260.      True if FILE exists and is executable.
  261. `-O FILE'
  262.      True if FILE exists and is owned by the current effective user id.
  263. `-G FILE'
  264.      True if FILE exists and is owned by the current effective group id.
  265. File: sh-utils.info,  Node: File characteristics tests,  Next: String tests,  Prev: Access permission tests,  Up: test invocation
  266. File characteristics tests
  267. --------------------------
  268.    These options test other file characteristics.
  269. `-e FILE'
  270.      True if FILE exists.
  271. `-s FILE'
  272.      True if FILE exists and has a size greater than zero.
  273. `FILE1 -nt FILE2'
  274.      True if FILE1 is newer (according to modification date) than FILE2.
  275. `FILE1 -ot FILE2'
  276.      True if FILE1 is older (according to modification date) than FILE2.
  277. `FILE1 -ef FILE2'
  278.      True if FILE1 and FILE2 have the same device and inode numbers,
  279.      i.e., if they are hard links to each other.
  280. File: sh-utils.info,  Node: String tests,  Next: Numeric tests,  Prev: File characteristics tests,  Up: test invocation
  281. String tests
  282. ------------
  283.    These options test string characteristics.  Strings are not quoted
  284. for `test', though you may need to quote them to protect characters
  285. with special meaning to the shell, e.g., spaces.
  286. `-z STRING'
  287.      True if the length of STRING is zero.
  288. `-n STRING'
  289. `STRING'
  290.      True if the length of STRING is non-zero.
  291. `STRING1 = STRING2'
  292.      True if the strings are equal.
  293. `STRING1 != STRING2'
  294.      True if the strings are not equal.
  295. File: sh-utils.info,  Node: Numeric tests,  Next: Connectives for test,  Prev: String tests,  Up: test invocation
  296. Numeric tests
  297. -------------
  298.    Numeric relationals.  The arguments must be entirely numeric
  299. (possibly negative), or the special expression `-l STRING', which
  300. evaluates to the length of STRING.
  301. `ARG1 -eq ARG2'
  302. `ARG1 -ne ARG2'
  303. `ARG1 -lt ARG2'
  304. `ARG1 -le ARG2'
  305. `ARG1 -gt ARG2'
  306. `ARG1 -ge ARG2'
  307.      These arithmetic binary operators return true if ARG1 is equal,
  308.      not-equal, less-than, less-than-or-equal, greater-than, or
  309.      greater-than-or-equal than ARG2, respectively.
  310.    For example:
  311.      test -1 -gt -2 && echo yes
  312.      => yes
  313.      test -l abc -gt 1 && echo yes
  314.      => yes
  315.      test 0x100 -eq 1
  316.      error--> test: integer expression expected before -eq
  317. File: sh-utils.info,  Node: Connectives for test,  Prev: Numeric tests,  Up: test invocation
  318. Connectives for `test'
  319. ----------------------
  320.    The usual logical connectives.
  321. `! EXPR'
  322.      True if EXPR is false.
  323. `EXPR1 -a EXPR2'
  324.      True if both EXPR1 and EXPR2 are true.
  325. `EXPR1 -o EXPR2'
  326.      True if either EXPR1 or EXPR2 is true.
  327. File: sh-utils.info,  Node: expr invocation,  Prev: test invocation,  Up: Conditions
  328. `expr': Evaluate expressions
  329. ============================
  330.    `expr' evaluates an expression and writes the result on standard
  331. output.  Each token of the expression must be a separate argument.
  332.    Operands are either numbers or strings.  `expr' coerces anything
  333. appearing in an operand position to an integer or a string depending on
  334. the operation being applied to it.
  335.    Strings are not quoted for `expr', though you may need to quote them
  336. to protect characters with special meaning to the shell, e.g., spaces.
  337.    Operators may given as infix symbols or prefix keywords.  Parentheses
  338. may be used for grouping in the usual manner (you must quote parentheses
  339. to avoid the shell evaluating them, however).
  340.    Exit status:
  341.      0 if the expression is neither null nor 0,
  342.      1 if the expression is null or 0,
  343.      2 for invalid expressions.
  344. * Menu:
  345. * Relations for expr::          | & < <= = == != >= >
  346. * Numeric expressions::         + - * / %
  347. * String expressions::          : match substr index length
  348. * Examples of expr::            Examples.
  349. File: sh-utils.info,  Node: Relations for expr,  Next: Numeric expressions,  Up: expr invocation
  350. Relations for `expr'
  351. --------------------
  352.    The usual logical connectives and relations, in order of precedence.
  353.      Yields its first argument if it is neither null nor 0, otherwise
  354.      its second argument.
  355.      Yields its first argument if neither argument is null or 0,
  356.      otherwise 0.
  357. `< <= = == != >= >'
  358.      Compare the arguments and return 1 if the relation is true, 0
  359.      otherwise.  `==' is a synonym for `='.  `expr' first tries to
  360.      coerce both arguments to numbers and do a numeric comparison; if
  361.      either coercion fails, it does a lexicographic comparison.
  362. File: sh-utils.info,  Node: Numeric expressions,  Next: String expressions,  Prev: Relations for expr,  Up: expr invocation
  363. Numeric expressions
  364. -------------------
  365.    Numeric operators, in order of increasing precedence.  The
  366. connectives (previous section) have higher precedence, the string
  367. operators (following section) have lower.
  368. `+ -'
  369.      Addition and subtraction.  Both arguments are coerced to numbers;
  370.      an error occurs if this cannot be done.
  371. `* / %'
  372.      Multiplication, division, remainder.  Both arguments are coerced to
  373.      numbers; an error occurs if this cannot be done.
  374. File: sh-utils.info,  Node: String expressions,  Next: Examples of expr,  Prev: Numeric expressions,  Up: expr invocation
  375. String expressions
  376. ------------------
  377.    String operators.  These have lowest precedence.
  378. `STRING : REGEX'
  379.      Perform pattern matching.  The arguments are coerced to strings
  380.      and the second is considered to be a (basic, a la `grep') regular
  381.      expression, with a `^' implicitly prepended.  The first argument is
  382.      then matched against this regular expression.
  383.      If the match succeeds and REGEX uses `\(' and `\)', the `:'
  384.      expression returns the part of STRING that matched the
  385.      subexpression; otherwise, it returns the number of characters
  386.      matched.
  387.      If the match fails, the `:' operator returns the null string if
  388.      `\(' and `\)' are used in REGEX, otherwise 0.
  389.      Only the first `\( ... \)' pair is relevant to the return value;
  390.      additional pairs are meaningful only for grouping the regular
  391.      expression operators.
  392.      *Note Regular Expression Library: (regex)Top, for details of
  393.      regular expression syntax.
  394. `match STRING REGEX'
  395.      An alternative way to do pattern matching.  This is the same as
  396.      `STRING : REGEX'.
  397. `substr STRING POSITION LENGTH'
  398.      Returns the substring of STRING beginning at POSITION with length
  399.      at most LENGTH.  If either POSITION or LENGTH is negative or
  400.      non-numeric, returns the null string.
  401. `index STRING CHARACTER-CLASS'
  402.      Returns the first position in STRING where the first character in
  403.      CHARSET was found.  If no character in CHARSET is found in STRING,
  404.      return 0.
  405. `length STRING'
  406.      Returns the length of STRING.
  407.    The keywords cannot be used as strings.
  408. File: sh-utils.info,  Node: Examples of expr,  Prev: String expressions,  Up: expr invocation
  409. Examples of `expr'
  410. ------------------
  411.    Here are a few examples, including quoting for shell metacharacters.
  412.    To add 1 to the shell variable `foo', in Bourne-compatible shells:
  413.      foo=`expr $foo + 1`
  414.    To print the non-directory part of the file name stored in `$fname',
  415. which need not contain a `/'.
  416.      expr $fname : '.*/\(^.*\)' '^|' $fname
  417.      expr abc : 'a\(.\)c'
  418.      => b
  419.      expr index abcdef cz
  420.      => 3
  421.      expr index index a
  422.      error--> expr: syntax error
  423. File: sh-utils.info,  Node: Redirection,  Next: File name manipulation,  Prev: Conditions,  Up: Top
  424. Redirection
  425. ***********
  426.    Unix shells commonly provide several forms of "redirection"--ways to
  427. change the input source or output destination of a command.  But one
  428. useful redirection is performed by a separate command, not by the shell;
  429. it's described here.
  430. * Menu:
  431. * tee invocation::              Redirect output to multiple files.
  432. File: sh-utils.info,  Node: tee invocation,  Up: Redirection
  433. `tee': Redirect output to multiple files
  434. ========================================
  435.    The `tee' command copies standard input to standard output and also
  436. to any files given as arguments.  This is useful when you want not only
  437. to send some data down a pipe, but also to save a copy.
  438.    Synopsis:
  439.      tee [ OPTION ]... [ FILE ]...
  440.    If a file being written to does not already exist, it is created.
  441. If a file being written to already exists, the data it previously
  442. contained is overwritten unless the `-a' option is used.
  443.    The program accepts the following options.  Also see *Note Common
  444. options::.
  445. `--append'
  446.      Append standard input to the given files rather than overwriting
  447.      them.
  448. `--ignore-interrupts'
  449.      Ignore interrupt signals.
  450. File: sh-utils.info,  Node: File name manipulation,  Next: Working context information,  Prev: Redirection,  Up: Top
  451. File name manipulation
  452. **********************
  453.    This section describes commands that manipulate file names.
  454. * Menu:
  455. * basename invocation::         Strip directory and suffix from a file name.
  456. * dirname invocation::          Strip non-directory suffix from a file name.
  457. * pathchk invocation::          Check file name portability.
  458. File: sh-utils.info,  Node: basename invocation,  Next: dirname invocation,  Up: File name manipulation
  459. `basename': Strip directory and suffix from a file name
  460. =======================================================
  461.    Synopsis:
  462.      basename NAME [ SUFFIX ]
  463.    The `basename' command removes any leading directory components from
  464. NAME.  If SUFFIX is specified and is identical to the end of NAME, it
  465. is removed from NAME as well.  `basename' prints the result on standard
  466. output.
  467.    The only options are `--help' and `--version'.  *Note Common
  468. options::.
  469. File: sh-utils.info,  Node: dirname invocation,  Next: pathchk invocation,  Prev: basename invocation,  Up: File name manipulation
  470. `dirname': Strip non-directory suffix from a file name
  471. ======================================================
  472.    Synopsis:
  473.      dirname NAME
  474.    `dirname' prints all but the final slash-delimited component of
  475. NAME.  If NAME is a single component, `dirname' prints `.' (meaning the
  476. current directory).
  477.    The only options are `--help' and `--version'.  *Note Common
  478. options::.
  479. File: sh-utils.info,  Node: pathchk invocation,  Prev: dirname invocation,  Up: File name manipulation
  480. `pathchk': Check file name portability
  481. ======================================
  482.    Synopsis:
  483.      pathchk [ OPTION ]... NAME...
  484.    For each NAME, `pathchk' prints a message if any of these conditions
  485. is true:
  486.   1. one of the existing directories in NAME does not have search
  487.      (execute) permission,
  488.   2. the length of NAME is larger than its filesystem's maximum file
  489.      name length,
  490.   3. the length of one component of NAME, corresponding to an existing
  491.      directory name, is larger than its filesystem's maximum length for
  492.      a file name component.
  493.    The program accepts the following option.  Also see *Note Common
  494. options::.
  495. `--portability'
  496.      Instead of performing length checks on the underlying filesystem,
  497.      test the length of each file name and its components against the
  498.      POSIX.1 minimum limits for portability.  Also check that the file
  499.      name contains no characters not in the portable file name
  500.      character set.
  501.    Exit status:
  502.      0 if all specified file names passed all of the tests,
  503.      1 otherwise.
  504. File: sh-utils.info,  Node: Working context information,  Next: User information,  Prev: File name manipulation,  Up: Top
  505. Working context information
  506. ***************************
  507.    This section describes commands that display or alter the context in
  508. which you are working: the current directory, the terminal settings, and
  509. so forth.  See also the user-related commands in the next section.
  510. * Menu:
  511. * pwd invocation::              Print working directory.
  512. * stty invocation::             Print or change terminal characteristics.
  513. * printenv invocation::         Print environment variables.
  514. * tty invocation::              Print file name of terminal on standard input.
  515. File: sh-utils.info,  Node: pwd invocation,  Next: stty invocation,  Up: Working context information
  516. `pwd': Print working directory
  517. ==============================
  518.    `pwd' prints the fully resolved name of the current directory.  That
  519. is, all components of the printed name will be actual directory
  520. names--none will be symbolic links.
  521.    Because most shells have a built-in command by the same name, using
  522. the unadorned command name in a script or interactively may get you
  523. different functionality than that described here.
  524.    The only options are a lone `--help' or `--version'.  *Note Common
  525. options::.
  526. File: sh-utils.info,  Node: stty invocation,  Next: printenv invocation,  Prev: pwd invocation,  Up: Working context information
  527. `stty': Print or change terminal characteristics
  528. ================================================
  529.    If given no arguments, `stty' prints the baud rate, line discipline
  530. number (on systems that support it), and line settings that have been
  531. changed from the values set by `stty sane'.  Mode reading and setting
  532. are performed on the tty line connected to standard input.
  533.    `stty' accepts many non-option arguments that change aspects of the
  534. terminal line operation, as described below.
  535.    Synopses:
  536.      stty [ SETTING ]...
  537.      stty [ OPTION ]
  538.    The program accepts the following options.  Also see *Note Common
  539. options::.
  540. `--all'
  541.      Print all current settings in human-readable form.
  542. `--save'
  543.      Print all current settings in a form that can be used as an
  544.      argument to another `stty' command to restore the current settings.
  545.    Many settings can be turned off by preceding them with a `-'.  Such
  546. arguments are marked below with "May be negated" in their description.
  547. The descriptions themselves refer to the positive case, that is, when
  548. *not* negated (unless stated otherwise, of course).
  549.    Some settings are not available on all POSIX systems, since they use
  550. extensions.  Such arguments are marked below with "Non-POSIX" in their
  551. description.  On non-POSIX systems, those or other settings also may not
  552. be available, but it's not feasible to document all the variations: just
  553. try it and see.
  554. * Menu:
  555. * Control::                     Control settings
  556. * Input::                       Input settings
  557. * Output::                      Output settings
  558. * Local::                       Local settings
  559. * Combination::                 Combination settings
  560. * Characters::                  Special characters
  561. * Special::                     Special settings
  562. File: sh-utils.info,  Node: Control,  Next: Input,  Up: stty invocation
  563. Control settings
  564. ----------------
  565.    Control settings:
  566. `parenb'
  567.      Generate parity bit in output and expect parity bit in input.  May
  568.      be negated.
  569. `parodd'
  570.      Set odd parity (even if negated).  May be negated.
  571. `cs5'
  572. `cs6'
  573. `cs7'
  574. `cs8'
  575.      Set character size to 5, 6, 7, or 8 bits.
  576. `hup'
  577. `hupcl'
  578.      Send a hangup signal when the last process closes the tty.  May be
  579.      negated.
  580. `cstopb'
  581.      Use two stop bits per character (one if negated).  May be negated.
  582. `cread'
  583.      Allow input to be received.  May be negated.
  584. `clocal'
  585.      Disable modem control signals.  May be negated.
  586. `crtscts'
  587.      Enable RTS/CTS flow control.  Non-POSIX.  May be negated.
  588. File: sh-utils.info,  Node: Input,  Next: Output,  Prev: Control,  Up: stty invocation
  589. Input settings
  590. --------------
  591. `ignbrk'
  592.      Ignore breaks.  May be negated.
  593. `brkint'
  594.      Make breaks cause an interrupt signal.  May be negated.
  595. `ignpar'
  596.      Ignore parity errors.  May be negated.
  597. `parmrk'
  598.      Mark parity errors (with a 255-0-character sequence).  May be
  599.      negated.
  600. `inpck'
  601.      Enable input parity checking.  May be negated.
  602. `istrip'
  603.      Clear high (8th) bit of input characters.  May be negated.
  604. `inlcr'
  605.      Translate newline to carriage return.  May be negated.
  606. `igncr'
  607.      Ignore carriage return.  May be negated.
  608. `icrnl'
  609.      Translate carriage return to newline.  May be negated.
  610. `ixon'
  611.      Enable XON/XOFF flow control (that is, CTRL-s/CTRL-Q).  May be
  612.      negated.
  613. `ixoff'
  614. `tandem'
  615.      Enable sending of `stop' character when the system input buffer is
  616.      almost full, and `start' character when it becomes almost empty
  617.      again.  May be negated.
  618. `iuclc'
  619.      Translate uppercase characters to lowercase.  Non-POSIX.  May be
  620.      negated.
  621. `ixany'
  622.      Allow any character to restart output (only the start character if
  623.      negated).  Non-POSIX.  May be negated.
  624. `imaxbel'
  625.      Enable beeping and not flushing input buffer if a character arrives
  626.      when the input buffer is full.  Non-POSIX.  May be negated.
  627. File: sh-utils.info,  Node: Output,  Next: Local,  Prev: Input,  Up: stty invocation
  628. Output settings
  629. ---------------
  630.    These arguments specify output-related operations.
  631. `opost'
  632.      Postprocess output.  May be negated.
  633. `olcuc'
  634.      Translate lowercase characters to uppercase.  Non-POSIX.  May be
  635.      negated.
  636. `ocrnl'
  637.      Translate carriage return to newline.  Non-POSIX.  May be negated.
  638. `onlcr'
  639.      Translate newline to carriage return-newline.  Non-POSIX.  May be
  640.      negated.
  641. `onocr'
  642.      Do not print carriage returns in the first column.  Non-POSIX.
  643.      May be negated.
  644. `onlret'
  645.      Newline performs a carriage return.  Non-POSIX.  May be negated.
  646. `ofill'
  647.      Use fill (padding) characters instead of timing for delays.
  648.      Non-POSIX.  May be negated.
  649. `ofdel'
  650.      Use delete characters for fill instead of null characters.
  651.      Non-POSIX.  May be negated.
  652. `nl1'
  653. `nl0'
  654.      Newline delay style.  Non-POSIX.
  655. `cr3'
  656. `cr2'
  657. `cr1'
  658. `cr0'
  659.      Carriage return delay style.  Non-POSIX.
  660. `tab3'
  661. `tab2'
  662. `tab1'
  663. `tab0'
  664.      Horizontal tab delay style.  Non-POSIX.
  665. `bs1'
  666. `bs0'
  667.      Backspace delay style.  Non-POSIX.
  668. `vt1'
  669. `vt0'
  670.      Vertical tab delay style.  Non-POSIX.
  671. `ff1'
  672. `ff0'
  673.      Form feed delay style.  Non-POSIX.
  674. File: sh-utils.info,  Node: Local,  Next: Combination,  Prev: Output,  Up: stty invocation
  675. Local settings
  676. --------------
  677. `isig'
  678.      Enable `interrupt', `quit', and `suspend' special characters.  May
  679.      be negated.
  680. `icanon'
  681.      Enable `erase', `kill', `werase', and `rprnt' special characters.
  682.      May be negated.
  683. `iexten'
  684.      Enable non-POSIX special characters.  May be negated.
  685. `echo'
  686.      Echo input characters.  May be negated.
  687. `echoe'
  688. `crterase'
  689.      Echo `erase' characters as backspace-space-backspace.  May be
  690.      negated.
  691. `echok'
  692.      Echo a newline after a `kill' character.  May be negated.
  693. `echonl'
  694.      Echo newline even if not echoing other characters.  May be negated.
  695. `noflsh'
  696.      Disable flushing after `interrupt' and `quit' special characters.
  697.      May be negated.
  698. `xcase'
  699.      Enable input and output of uppercase characters by preceding their
  700.      lowercase equivalents with `\', when `icanon' is set.  Non-POSIX.
  701.      May be negated.
  702. `tostop'
  703.      Stop background jobs that try to write to the terminal.  Non-POSIX.
  704.      May be negated.
  705. `echoprt'
  706. `prterase'
  707.      Echo erased characters backward, between `\' and `/'.  Non-POSIX.
  708.      May be negated.
  709. `echoctl'
  710. `ctlecho'
  711.      Echo control characters in hat notation (`^C') instead of
  712.      literally.  Non-POSIX.  May be negated.
  713. `echoke'
  714. `crtkill'
  715.      Echo the `kill' special character by erasing each character on the
  716.      line as indicated by the `echoprt' and `echoe' settings, instead
  717.      of by the `echoctl' and `echok' settings.  Non-POSIX.  May be
  718.      negated.
  719. File: sh-utils.info,  Node: Combination,  Next: Characters,  Prev: Local,  Up: stty invocation
  720. Combination settings
  721. --------------------
  722.    Combination settings:
  723. `evenp'
  724. `parity'
  725.      Same as `parenb -parodd cs7'.  May be negated.  If negated, same
  726.      as `-parenb cs8'.
  727. `oddp'
  728.      Same as `parenb parodd cs7'.  May be negated.  If negated, same as
  729.      `-parenb cs8'.
  730.      Same as `-icrnl -onlcr'.  May be negated.  If negated, same as
  731.      `icrnl -inlcr -igncr onlcr -ocrnl -onlret'.
  732.      Reset the `erase' and `kill' special characters to their default
  733.      values.
  734. `sane'
  735.      Same as:
  736.           cread -ignbrk brkint -inlcr -igncr icrnl -ixoff -iuclc -ixany
  737.           imaxbel opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel
  738.           nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl
  739.           -noflsh -xcase -tostop -echoprt echoctl echoke
  740.       and also sets all special characters to their default values.
  741. `cooked'
  742.      Same as `brkint ignpar istrip icrnl ixon opost isig icanon', plus
  743.      sets the `eof' and `eol' characters to their default values if
  744.      they are the same as the `min' and `time' characters.  May be
  745.      negated.  If negated, same as `raw'.
  746. `raw'
  747.      Same as:
  748.           -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr
  749.           -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -opost -isig -icanon
  750.           -xcase min 1 time 0
  751.       May be negated.  If negated, same as `cooked'.
  752. `cbreak'
  753.      Same as `-icanon'.  May be negated.  If negated, same as `icanon'.
  754. `pass8'
  755.      Same as `-parenb -istrip cs8'.  May be negated.  If negated, same
  756.      as `parenb istrip cs7'.
  757. `litout'
  758.      Same as `-parenb -istrip -opost cs8'.  May be negated.  If
  759.      negated, same as `parenb istrip opost cs7'.
  760. `decctlq'
  761.      Same as `-ixany'.  Non-POSIX.  May be negated.
  762. `tabs'
  763.      Same as `tab0'.  Non-POSIX.  May be negated.  If negated, same as
  764.      `tab3'.
  765. `lcase'
  766. `LCASE'
  767.      Same as `xcase iuclc olcuc'.  Non-POSIX.  May be negated.
  768. `crt'
  769.      Same as `echoe echoctl echoke'.
  770. `dec'
  771.      Same as `echoe echoctl echoke -ixany intr ^C erase ^? kill C-u'.
  772. File: sh-utils.info,  Node: Characters,  Next: Special,  Prev: Combination,  Up: stty invocation
  773. Special characters
  774. ------------------
  775.    The special characters' default values vary from system to system.
  776. They are set with the syntax `name value', where the names are listed
  777. below and the value can be given either literally, in hat notation
  778. (`^C'), or as an integer which may start with `0x' to indicate
  779. hexadecimal, `0' to indicate octal, or any other digit to indicate
  780. decimal.
  781.    For GNU stty, giving a value of `^-' or `undef' disables that
  782. special character.  (This is incompatible with Ultrix `stty', which
  783. uses  a value of `u' to disable a special character.  GNU `stty' treats
  784. a value `u' like any other, namely to set that special character to u.)
  785. `intr'
  786.      Send an interrupt signal.
  787. `quit'
  788.      Send a quit signal.
  789. `erase'
  790.      Erase the last character typed.
  791. `kill'
  792.      Erase the current line.
  793. `eof'
  794.      Send an end of file (terminate the input).
  795. `eol'
  796.      End the line.
  797. `eol2'
  798.      Alternate character to end the line.  Non-POSIX.
  799. `swtch'
  800.      Switch to a different shell layer.  Non-POSIX.
  801. `start'
  802.      Restart the output after stopping it.
  803. `stop'
  804.      Stop the output.
  805. `susp'
  806.      Send a terminal stop signal.
  807. `dsusp'
  808.      Send a terminal stop signal after flushing the input.  Non-POSIX.
  809. `rprnt'
  810.      Redraw the current line.  Non-POSIX.
  811. `werase'
  812.      Erase the last word typed.  Non-POSIX.
  813. `lnext'
  814.      Enter the next character typed literally, even if it is a special
  815.      character.  Non-POSIX.
  816. File: sh-utils.info,  Node: Special,  Prev: Characters,  Up: stty invocation
  817. Special settings
  818. ----------------
  819. `min N'
  820.      Set the minimum number of characters that will satisfy a read until
  821.      the time value has expired, when `-icanon' is set.
  822. `time N'
  823.      Set the number of tenths of a second before reads time out if the
  824.      min number of characters have not been read, when `-icanon' is set.
  825. `ispeed N'
  826.      Set the input speed to N.
  827. `ospeed N'
  828.      Set the output speed to N.
  829. `rows N'
  830.      Tell the tty kernel driver that the terminal has N rows.
  831.      Non-POSIX.
  832. `cols N'
  833. `columns N'
  834.      Tell the kernel that the terminal has N columns.  Non-POSIX.
  835. `size'
  836.      Print the number of rows and columns that the kernel thinks the
  837.      terminal has.  (Systems that don't support rows and cols in the
  838.      kernel typically use the environment variables `LINES' and
  839.      `COLUMNS' instead; however, GNU `stty' does not know anything
  840.      about them.) Non-POSIX.
  841. `line N'
  842.      Use line discipline N.  Non-POSIX.
  843. `speed'
  844.      Print the terminal speed.
  845.      Set the input and output speeds to N.  N can be one of: 0 50 75
  846.      110 134 134.5 150 200 300 600 1200 1800 2400 4800 9600 19200 38400
  847.      `exta' `extb'.  `exta' is the same as 19200; `extb' is the same as
  848.      38400.  0 hangs up the line if `-clocal' is set.
  849. File: sh-utils.info,  Node: printenv invocation,  Next: tty invocation,  Prev: stty invocation,  Up: Working context information
  850. `printenv': Print all or some environment variables
  851. ===================================================
  852.    Synopsis:
  853.      printenv [ OPTION ] [ VARIABLE ]...
  854.    If no VARIABLEs are specified, `printenv' prints the value of every
  855. environment variable.  Otherwise, it prints the value of each VARIABLE
  856. that is set, and nothing for those that are not set.
  857.    The only options are a lone `--help' or `--version'.  *Note Common
  858. options::.
  859.    Exit status:
  860.      0 if all variables specified were found
  861.      1 if at least one specified variable was not found
  862.      2 if a write error occurred
  863. File: sh-utils.info,  Node: tty invocation,  Prev: printenv invocation,  Up: Working context information
  864. `tty': Print file name of terminal on standard input
  865. ====================================================
  866.    `tty' prints the file name of the tty connected to its standard
  867. input.  It prints `not a tty' if standard input is not a tty.
  868.    Synopsis:
  869.      tty [ OPTION ]...
  870.    The program accepts the following option.  Also see *Note Common
  871. options::.
  872. `--silent'
  873. `--quiet'
  874.      Print nothing; only return an exit status.
  875.    Exit status:
  876.      0 if standard input is a tty
  877.      1 if standard input is not a tty
  878.      2 if given incorrect arguments
  879.      3 if a write error occurs
  880. File: sh-utils.info,  Node: User information,  Next: System context,  Prev: Working context information,  Up: Top
  881. User information
  882. ****************
  883.    This section describes commands that print user-related information:
  884. logins, groups, and so forth.
  885. * Menu:
  886. * id invocation::               Print real and effective uid and gid.
  887. * logname invocation::          Print current login name.
  888. * whoami invocation::           Print effective user id.
  889. * groups invocation::           Print group names a user is in.
  890. * users invocation::            Print login names of users currently logged in.
  891. * who invocation::              Print who is currently logged in.
  892. File: sh-utils.info,  Node: id invocation,  Next: logname invocation,  Up: User information
  893. `id': Print real and effective uid and gid
  894. ==========================================
  895. `id' prints information about the given user, or the process running it
  896. if no user is specified.
  897.    Synopsis:
  898.      id [ OPTION ]... [ USERNAME ]
  899.    By default, it prints the real user id, real group id, effective
  900. user id if different from the real user id, effective group id if
  901. different from the real group id, and supplemental group ids.
  902.    Each of these numeric values is preceded by an identifying string and
  903. followed by the corresponding user or group name in parentheses.
  904.    The options cause `id' to print only part of the above information.
  905. Also see *Note Common options::.
  906. `--group'
  907.      Print only the group id.
  908. `--groups'
  909.      Print only the supplementary groups.
  910. `--name'
  911.      Print the user or group name instead of the ID number.  Requires
  912.      `-u', `-g', or `-G'.
  913. `--real'
  914.      Print the real, instead of effective, user or group id.  Requires
  915.      `-u', `-g', or `-G'.
  916. `--user'
  917.      Print only the user id.
  918. File: sh-utils.info,  Node: logname invocation,  Next: whoami invocation,  Prev: id invocation,  Up: User information
  919. `logname': Print current login name
  920. ===================================
  921.    `logname' prints the calling user's name, as found in the file
  922. `/etc/utmp', and exits with a status of 0.  If there is no `/etc/utmp'
  923. entry for the calling process, `logname' prints an error message and
  924. exits with a status of 1.
  925.    The only options are `--help' and `--version'.  *Note Common
  926. options::.
  927. File: sh-utils.info,  Node: whoami invocation,  Next: groups invocation,  Prev: logname invocation,  Up: User information
  928. `whoami': Print effective user id
  929. =================================
  930.    `whoami' prints the user name associated with the current effective
  931. user id.  It is equivalent to the command `id -un'.
  932.    The only options are `--help' and `--version'.  *Note Common
  933. options::.
  934. File: sh-utils.info,  Node: groups invocation,  Next: users invocation,  Prev: whoami invocation,  Up: User information
  935. `groups': Print group names a user is in
  936. ========================================
  937.    `groups' prints the names of the primary and any supplementary
  938. groups that each given USERNAME, or the current process if none are
  939. given, is in.  If user names are given, the name of each user is
  940. printed before the list of that user's groups.
  941.    Synopsis:
  942.      groups [ USERNAME ]...
  943.    The group lists are equivalent to the output of the command `id -Gn'.
  944.    The only options are `--help' and `--version'.  *Note Common
  945. options::.
  946. File: sh-utils.info,  Node: users invocation,  Next: who invocation,  Prev: groups invocation,  Up: User information
  947. `users': Print login names of users currently logged in
  948. =======================================================
  949.    `users' prints on a single line a blank-separated list of user names
  950. of users currently logged in to the current host.  Each user name
  951. corresponds to a login session, so if a user has more than one login
  952. session, that user's name will appear the same number of times in the
  953. output.
  954.    Synopsis:
  955.      users [ FILE ]
  956.    With no FILE argument, `users' extracts its information from the
  957. file `/etc/utmp'.  If a file argument is given, `users' uses that file
  958. instead.  A common choice is `/etc/wtmp'.
  959.    The only options are `--help' and `--version'.  *Note Common
  960. options::.
  961. File: sh-utils.info,  Node: who invocation,  Prev: users invocation,  Up: User information
  962. `who': Print who is currently logged in
  963. =======================================
  964.    Synopsis:
  965.      `who' [ OPTION ] [ FILE ] [ am i ]
  966.    If given no non-option arguments, `who' prints the following
  967. information for each user currently logged on: login name, terminal
  968. line, login time, and remote hostname or X display.
  969.    If given one non-option argument, `who' uses that instead of
  970. `/etc/utmp' as the name of the file containing the record of users
  971. logged on.  `/etc/wtmp' is commonly given as an argument to `who' to
  972. look at who has previously logged on.
  973.    If given two non-option arguments, `who' prints only the entry for
  974. the user running it (determined from its standard input), preceded by
  975. the hostname.  Traditionally, the two arguments given are `am i', as in
  976. `who am i'.
  977.    The program accepts the following options.  Also see *Note Common
  978. options::.
  979.      Same as `who am i'.
  980. `--count'
  981.      Print only the login names and the number of users logged on.
  982.      Overrides all other options.
  983.      Ignored; for compatibility with other versions of `who'.
  984. `--idle'
  985.      After the login time, print the number of hours and minutes that
  986.      the user has been idle.  `.' means the user was active in last
  987.      minute.  `old' means the user was idle for more than 24 hours.
  988. `--heading'
  989.      Print a line of column headings.
  990. `--mesg'
  991. `--message'
  992. `--writable'
  993.      After each login name print a character indicating the user's
  994.      message status:
  995.           `+' allowing `write' messages
  996.           `-' disallowing `write' messages
  997.           `?' cannot find terminal device
  998. File: sh-utils.info,  Node: System context,  Next: Modified command invocation,  Prev: User information,  Up: Top
  999. System context
  1000. **************
  1001.    This section describes commands that print or change system-wide
  1002. information.
  1003. * Menu:
  1004. * date invocation::             Print or set system date and time.
  1005. * uname invocation::            Print system information.
  1006. * hostname invocation::         Print or set system name.
  1007. File: sh-utils.info,  Node: date invocation,  Next: uname invocation,  Up: System context
  1008. `date': Print or set system date and time
  1009. =========================================
  1010.    `date' with no arguments prints the current time and date, in the
  1011. format of the `%c' directive (described below).
  1012.    Synopses:
  1013.      date [ OPTION ]... [ +FORMAT ]
  1014.      date [ -u|--utc|--universal ] [ MMDDHHMM[[CC]YY][.SS] ]
  1015.    If given an argument that starts with a `+', `date' prints the
  1016. current time and date (or the time and date specified by the `--date'
  1017. option, see below) in the format defined by that argument, which is the
  1018. same as in the `strftime' function.  Except for directives, which start
  1019. with `%', characters in the format string are printed unchanged.  The
  1020. directives are described below.
  1021.    By default, `date' pads numeric fields with zeroes.  GNU `date'
  1022. recognizes the following numeric modifiers between the `%' and the
  1023. directive.  These are GNU extensions.
  1024.      (hyphen) do not pad the field
  1025.      (underscore) pad the field with spaces
  1026. * Menu:
  1027. * Time directives::             %[HIklMprsSTXZ]
  1028. * Date directives::             %[aAbBcdDhjmUwWxyY]
  1029. * Literal directives::          %[%nt]
  1030. * Setting the time::            Changing the system clock.
  1031. * Options for date::            Instead of the current time.
  1032. * Examples of date::            Examples.
  1033. File: sh-utils.info,  Node: Time directives,  Next: Date directives,  Up: date invocation
  1034. Time directives
  1035. ---------------
  1036.    `date' directives related to times.
  1037.      hour (00...23)
  1038.      hour (01...12)
  1039.      hour ( 0...23)
  1040.      hour ( 1...12)
  1041.      minute (00...59)
  1042.      locale's AM or PM
  1043.      time, 12-hour (hh:mm:ss [AP]M)
  1044.      seconds since the epoch, i.e., 1 January 1970 00:00:00 UTC (a GNU
  1045.      extension)
  1046.      second (00...61)
  1047.      time, 24-hour (hh:mm:ss)
  1048.      locale's time representation (%H:%M:%S)
  1049.      time zone (e.g., EDT), or nothing if no time zone is determinable
  1050. File: sh-utils.info,  Node: Date directives,  Next: Literal directives,  Prev: Time directives,  Up: date invocation
  1051. Date directives
  1052. ---------------
  1053.    `date' directives related to dates.
  1054.      locale's abbreviated weekday name (Sun...Sat)
  1055.      locale's full weekday name, variable length (Sunday...Saturday)
  1056.      locale's abbreviated month name (Jan...Dec)
  1057.      locale's full month name, variable length (January...December)
  1058.      locale's date and time (Sat Nov 04 12:02:33 EST 1989)
  1059.      day of month (01...31)
  1060.      date (mm/dd/yy)
  1061.      same as %b
  1062.      day of year (001...366)
  1063.      month (01...12)
  1064.      week number of year with Sunday as first day of week (00...53)
  1065.      day of week (0...6) with 0 corresponding to Sunday
  1066.      week number of year with Monday as first day of week (00...53)
  1067.      locale's date representation (mm/dd/yy)
  1068.      last two digits of year (00...99)
  1069.      year (1970....)
  1070. File: sh-utils.info,  Node: Literal directives,  Next: Setting the time,  Prev: Date directives,  Up: date invocation
  1071. Literal directives
  1072. ------------------
  1073.    `date' directives that produce literal strings.
  1074.      a literal %
  1075.      a newline
  1076.      a horizontal tab
  1077. File: sh-utils.info,  Node: Setting the time,  Next: Options for date,  Prev: Literal directives,  Up: date invocation
  1078. Setting the time
  1079. ----------------
  1080.    If given an argument that does not start with `+', `date' sets the
  1081. system clock to the time and date specified by that argument (as
  1082. described below).  You must have appropriate privileges to set the
  1083. system clock.  The `--date' and `--set' options may not be used with
  1084. such an argument.  The `--universal' option may be used with such an
  1085. argument to indicate that the specified time and date are relative to
  1086. Coordinated Universal Time rather than to the local time zone.
  1087.    The argument must consist entirely of digits, which have the
  1088. following meaning:
  1089.      month
  1090.      day within month
  1091.      hour
  1092.      minute
  1093.      first two digits of year (optional)
  1094.      last two digits of year (optional)
  1095.      second (optional)
  1096.    The `--set' option also sets the system clock; see the next section.
  1097. File: sh-utils.info,  Node: Options for date,  Next: Examples of date,  Prev: Setting the time,  Up: date invocation
  1098. Options for `date'
  1099. ------------------
  1100.    The program accepts the following options.  Also see *Note Common
  1101. options::.
  1102. `-d DATESTR'
  1103. `--date=DATESTR'
  1104.      Display the time and date specified in DATESTR instead of the
  1105.      current time and date.  DATESTR can be in almost any common
  1106.      format.  It can contain month names, timezones, `am' and `pm',
  1107.      `yesterday', `ago', `next', etc.  The source file `getdate.y'
  1108.      implements this parsing for all GNU routines; we need precise
  1109.      documentation!
  1110. `-f DATEFILE'
  1111. `--file=DATEFILE'
  1112.      Parse each line in DATEFILE as with `-d' and display the resulting
  1113.      time and date.  If DATEFILE is `-', use standard input.  This is
  1114.      useful when you have many dates to process, because the system
  1115.      overhead of starting up the `date' executable many times can be
  1116.      considerable.
  1117. `-s DATESTR'
  1118. `--set=DATESTR'
  1119.      Set the time and date to DATESTR,  See `-d' above.
  1120. `--utc'
  1121. `--universal'
  1122.      Print or set the time and date in Universal Coordinated Time
  1123.      instead of in local (wall clock) time.
  1124. File: sh-utils.info,  Node: Examples of date,  Prev: Options for date,  Up: date invocation
  1125. Examples of `date'
  1126. ------------------
  1127.    Here are a few examples.  Also see the documentation for the `-d'
  1128. option in the previous section.
  1129.    * To print the date of the day before yesterday:
  1130.           date --date='2 days ago'
  1131.    * To print the date of the day three months and one day hence:
  1132.           date --date='3 months 1 day'
  1133.    * To print the day of year of Christmas in the current year:
  1134.           date --date='25 Dec' +%j
  1135.    * To print the current full month name and the day of the month:
  1136.           date '+%B %d'
  1137.      But this may not be what you want because for the first nine days
  1138.      of the month, the `%d' expands to a zero-padded two-digit field,
  1139.      for example `date -d 1may '+%B %d'' will print `May 01'.
  1140.    * To print a date without the leading zero for one-digit days of the
  1141.      month, you can use the (GNU extension) `-' modifier to suppress
  1142.      the padding altogether.
  1143.           date -d=1may '+%B %-d'
  1144.    * To print the current date and time in the format required by many
  1145.      non-GNU versions of `date' when setting the system clock:
  1146.           date +%m%d%H%M%Y.%S
  1147.    * To set the system clock forward by two minutes:
  1148.           date --set='+2 minutes'
  1149. File: sh-utils.info,  Node: uname invocation,  Next: hostname invocation,  Prev: date invocation,  Up: System context
  1150. `uname': Print system information
  1151. =================================
  1152.    `uname' prints information about the machine and operating system it
  1153. is run on.  If no options are given, `uname' acts as if the `-s' option
  1154. were given.
  1155.    Synopsis:
  1156.      uname [ OPTION ]...
  1157.    If multiple options or `-a' are given, the selected information is
  1158. printed in this order:
  1159.      SYSNAME NODENAME RELEASE OSVERSION MACHINE
  1160.    The OSVERSION, at least, may well be multiple words.  For example:
  1161.      bash$ uname -a
  1162.      => Linux hayley 1.0.4 #3 Thu May 12 18:06:34 1994 i486
  1163.    The program accepts the following options.  Also see *Note Common
  1164. options::.
  1165. `--all'
  1166.      Print all of the below information.
  1167. `--machine'
  1168.      Print the machine (hardware) type.
  1169. `--nodename'
  1170.      Print the machine's network node hostname.
  1171. `--release'
  1172.      Print the operating system release.
  1173. `--sysname'
  1174.      Print the operating system name.
  1175.      Print the operating system version.
  1176. File: sh-utils.info,  Node: hostname invocation,  Prev: uname invocation,  Up: System context
  1177. `hostname': Print or set system name
  1178. ====================================
  1179.    With no arguments, `hostname' prints the name of the current host
  1180. system.  With one argument, it sets the current host name to the
  1181. specified string.  You must have appropriate privileges to set the host
  1182. name.
  1183.    Synopsis:
  1184.      hostname [ NAME ]
  1185.    The only options are `--help' and `--version'.  *Note Common
  1186. options::.
  1187. File: sh-utils.info,  Node: Modified command invocation,  Next: Delaying,  Prev: System context,  Up: Top
  1188. Modified command invocation
  1189. ***************************
  1190.    This section describes commands that run other commands in some
  1191. context different than the current one: a modified environment, as a
  1192. different user, etc.
  1193. * Menu:
  1194. * env invocation::              Modify environment variables.
  1195. * nice invocation::             Modify scheduling priority.
  1196. * nohup invocation::            Immunize to hangups.
  1197. * su invocation::               Modify user and group id.
  1198. File: sh-utils.info,  Node: env invocation,  Next: nice invocation,  Up: Modified command invocation
  1199. `env': Run a command in a modified environment
  1200. ==============================================
  1201.    `env' runs a command with an environment modified as specified by
  1202. the command line arguments.
  1203.    Synopses:
  1204.      env [ OPTION ]... [ NAME=VALUE ]... [ COMMAND [ ARGS ]... ]
  1205.      env
  1206.    Arguments of the form `VARIABLE=VALUE' set the environment variable
  1207. VARIABLE to value VALUE.  VALUE may be empty (`VARIABLE=').  Setting a
  1208. variable to an empty value is different from unsetting it.
  1209.    The first remaining argument specifies the program name to invoke;
  1210. it is searched for according to the `PATH' environment variable.  Any
  1211. remaining arguments are passed as arguments to that program.
  1212.    If no command name is specified following the environment
  1213. specifications, the resulting environment is printed.  This is like
  1214. specifying a command name of `printenv'.
  1215.    The program accepts the following options.  Also see *Note Common
  1216. options::.
  1217. `-u NAME'
  1218. `--unset=NAME'
  1219.      Remove variable NAME from the environment, if it was in the
  1220.      environment.
  1221. `--ignore-environment'
  1222.      Start with an empty environment, ignoring the inherited
  1223.      environment.
  1224. File: sh-utils.info,  Node: nice invocation,  Next: nohup invocation,  Prev: env invocation,  Up: Modified command invocation
  1225. `nice': Run a command with modified scheduling priority
  1226. =======================================================
  1227.    If no arguments are given, `nice' prints the current scheduling
  1228. priority, which it inherited.  Otherwise, `nice' runs the given COMMAND
  1229. with its scheduling priority adjusted.  If no ADJUSTMENT is given, the
  1230. priority of the command is incremented by 10.  You must have
  1231. appropriate privileges to specify a negative adjustment.  The priority
  1232. can be adjusted by `nice' over the range of -20 (the highest priority)
  1233. to 19 (the lowest).
  1234.    Synopsis:
  1235.      nice [ OPTION ]... [ COMMAND [ ARG ]... ]
  1236.    Because most shells have a built-in command by the same name, using
  1237. the unadorned command name in a script or interactively may get you
  1238. different functionality than that described here.
  1239.    The program accepts the following option.  Also see *Note Common
  1240. options::.
  1241. `-n ADJUSTMENT'
  1242. `-ADJUSTMENT'
  1243. `--adjustment=ADJUSTMENT'
  1244.      Add ADJUSTMENT instead of 10 to the command's priority.
  1245. File: sh-utils.info,  Node: nohup invocation,  Next: su invocation,  Prev: nice invocation,  Up: Modified command invocation
  1246. `nohup': Run a command immune to hangups
  1247. ========================================
  1248.    `nohup' runs the given COMMAND with hangup signals ignored, so that
  1249. the command can continue running in the background after you log out.
  1250.    Synopsis:
  1251.      nohup COMMAND [ ARG ]...
  1252.    Also, the scheduling priority is increased by 5.  If standard output
  1253. is a tty, it and standard error are redirected so that they are
  1254. appended to the file `nohup.out'; if that cannot be written to, they are
  1255. appended to the file `$HOME/nohup.out'.  If that cannot be written to,
  1256. the command is not run.
  1257.    If `nohup' creates either `nohup.out' or `$HOME/nohup.out', it
  1258. creates it with no "group" or "other" access permissions.  It does not
  1259. change the permissions if the output file already existed.
  1260.    `nohup' does not automatically put the command it runs in the
  1261. background; you must do that explicitly, by ending the command line
  1262. with an `&'.
  1263.    The only options are `--help' and `--version'.  *Note Common
  1264. options::.
  1265. File: sh-utils.info,  Node: su invocation,  Prev: nohup invocation,  Up: Modified command invocation
  1266. `su': Run a command with substitute user and group id
  1267. =====================================================
  1268.    `su' allows one user to temporarily become another user.  It runs a
  1269. command (often an interactive shell) with the real and effective user
  1270. id, group id, and supplemental groups of a given USER.
  1271.    Synopsis:
  1272.      su [ OPTION ]... [ USER [ ARG ]... ]
  1273.    If no USER is given, the default is `root', the super-user.  The
  1274. shell to use is taken from USER's `passwd' entry, or `/bin/sh' if none
  1275. is specified there.  If USER has a password, `su' prompts for the
  1276. password unless run by a user with effective user id of zero (the
  1277. super-user).
  1278.    By default, `su' does not change the current directory.  It sets the
  1279. environment variables `HOME' and `SHELL' from the password entry for
  1280. USER, and if USER is not the super-user, sets `USER' and `LOGNAME' to
  1281. USER.  By default, the shell is not a login shell.
  1282.    Any additional ARGs are passed as additional arguments to the shell.
  1283.    GNU `su' does not treat `/bin/sh' or any other shells specially
  1284. (e.g., by setting `argv[0]' to `-su', passing `-c' only to certain
  1285. shells, etc.).
  1286.    `su' can optionally be compiled to use `syslog' to report failed,
  1287. and optionally successful, `su' attempts.  (If the system supports
  1288. `syslog'.)  However, GNU `su' does not check if the user is a member of
  1289. the `wheel' group; see below.
  1290.    The program accepts the following options.  Also see *Note Common
  1291. options::.
  1292. `-c COMMAND'
  1293. `--command=COMMAND'
  1294.      Pass COMMAND, a single command line to run, to the shell with a
  1295.      `-c' option instead of starting an interactive shell.
  1296. `--fast'
  1297.      Pass the `-f' option to the shell.  This probably only makes sense
  1298.      if the shell run is `csh' or `tcsh', for which the `-f' option
  1299.      prevents reading the startup file (`.cshrc').  With Bourne-like
  1300.      shells, the `-f' option disables file name pattern expansion
  1301.      (globbing), which is not likely to be useful.
  1302. `--login'
  1303.      Make the shell a login shell.  This means the following.  Unset all
  1304.      environment variables except `TERM', `HOME', and `SHELL' (which
  1305.      are set as described above), and `USER' and `LOGNAME' (which are
  1306.      set, even for the super-user, as described above), and set `PATH'
  1307.      to a compiled-in default value.  Change to USER's home directory.
  1308.      Prepend `-' to the shell's name, intended to make it read its
  1309.      login startup file(s).
  1310. `--preserve-environment'
  1311.      Do not change the environment variables `HOME', `USER', `LOGNAME',
  1312.      or `SHELL'.  Run the shell given in the environment variable
  1313.      `SHELL' instead of the shell from USER's passwd entry, unless the
  1314.      user running `su' is not the superuser and USER's shell is
  1315.      restricted.  A "restricted shell" is one that is not listed in the
  1316.      file `/etc/shells', or in a compiled-in list if that file does not
  1317.      exist.  Parts of what this option does can be overridden by
  1318.      `--login' and `--shell'.
  1319. `-s SHELL'
  1320. `--shell=SHELL'
  1321.      Run SHELL instead of the shell from USER's passwd entry, unless
  1322.      the user running `su' is not the superuser and USER's shell is
  1323.      restricted (see `-m' just above).
  1324. Why GNU `su' does not support the `wheel' group
  1325. ===============================================
  1326.    (This section is by Richard Stallman.)
  1327.    Sometimes a few of the users try to hold total power over all the
  1328. rest.  For example, in 1984, a few users at the MIT AI lab decided to
  1329. seize power by changing the operator password on the Twenex system and
  1330. keeping it secret from everyone else.  (I was able to thwart this coup
  1331. and give power back to the users by patching the kernel, but I wouldn't
  1332. know how to do that in Unix.)
  1333.    However, occasionally the rulers do tell someone.  Under the usual
  1334. `su' mechanism, once someone learns the root password who sympathizes
  1335. with the ordinary users, he or she can tell the rest.  The "wheel
  1336. group" feature would make this impossible, and thus cement the power of
  1337. the rulers.
  1338.    I'm on the side of the masses, not that of the rulers.  If you are
  1339. used to supporting the bosses and sysadmins in whatever they do, you
  1340. might find this idea strange at first.
  1341. File: sh-utils.info,  Node: Delaying,  Next: Index,  Prev: Modified command invocation,  Up: Top
  1342. Delaying
  1343. ********
  1344.    Perhaps `wait' or other commands should be described here also?
  1345. * Menu:
  1346. * sleep invocation::            Delay for a specified time.
  1347. File: sh-utils.info,  Node: sleep invocation,  Up: Delaying
  1348. `sleep': Delay for a specified time
  1349. ===================================
  1350.    `sleep' pauses for an amount of time specified by the sum of the
  1351. values of the command line arguments.
  1352.    Synopsis:
  1353.      sleep [ NUMBER[smhd] ]...
  1354.    Each argument is a number followed by an optional unit; the default
  1355. is seconds.  The units are:
  1356.      seconds
  1357.      minutes
  1358.      hours
  1359.      days
  1360.    The only options are `--help' and `--version'.  *Note Common
  1361. options::.
  1362. File: sh-utils.info,  Node: Index,  Prev: Delaying,  Up: Top
  1363. Index
  1364. *****
  1365. * Menu:
  1366. * !:                                    Connectives for test.
  1367. * !=:                                   String tests.
  1368. * %:                                    Numeric expressions.
  1369. * &:                                    Relations for expr.
  1370. * *:                                    Numeric expressions.
  1371. * +:                                    Numeric expressions.
  1372. * -:                                    Numeric expressions.
  1373. * -:                                    env invocation.
  1374. * -:                                    su invocation.
  1375. * -adjustment:                          nice invocation.
  1376. * -all:                                 stty invocation.
  1377. * -all:                                 uname invocation.
  1378. * -append:                              tee invocation.
  1379. * -command:                             su invocation.
  1380. * -count:                               who invocation.
  1381. * -date:                                Options for date.
  1382. * -fast:                                su invocation.
  1383. * -file:                                Options for date.
  1384. * -group:                               id invocation.
  1385. * -groups:                              id invocation.
  1386. * -heading:                             who invocation.
  1387. * -help:                                Common options.
  1388. * -idle:                                who invocation.
  1389. * -ignore-environment:                  env invocation.
  1390. * -ignore-interrupts:                   tee invocation.
  1391. * -login:                               su invocation.
  1392. * -machine:                             uname invocation.
  1393. * -mesg:                                who invocation.
  1394. * -message:                             who invocation.
  1395. * -name:                                id invocation.
  1396. * -nodename:                            uname invocation.
  1397. * -portability:                         pathchk invocation.
  1398. * -preserve-environment:                su invocation.
  1399. * -quiet:                               tty invocation.
  1400. * -real:                                id invocation.
  1401. * -release:                             uname invocation.
  1402. * -save:                                stty invocation.
  1403. * -set:                                 Options for date.
  1404. * -shell:                               su invocation.
  1405. * -silent:                              tty invocation.
  1406. * -sysname:                             uname invocation.
  1407. * -universal:                           Options for date.
  1408. * -user:                                id invocation.
  1409. * -utc:                                 Options for date.
  1410. * -version:                             Common options.
  1411. * -writable:                            who invocation.
  1412. * -ADJUSTMENT:                          nice invocation.
  1413. * -a:                                   uname invocation.
  1414. * -a:                                   tee invocation.
  1415. * -a:                                   Connectives for test.
  1416. * -a:                                   stty invocation.
  1417. * -b:                                   File type tests.
  1418. * -c:                                   File type tests.
  1419. * -c:                                   su invocation.
  1420. * -d:                                   Options for date.
  1421. * -d:                                   File type tests.
  1422. * -e:                                   File characteristics tests.
  1423. * -e:                                   echo invocation.
  1424. * -ef:                                  File characteristics tests.
  1425. * -eq:                                  Numeric tests.
  1426. * -f:                                   Options for date.
  1427. * -f:                                   su invocation.
  1428. * -f:                                   File type tests.
  1429. * -g:                                   Access permission tests.
  1430. * -G:                                   id invocation.
  1431. * -G:                                   Access permission tests.
  1432. * -g:                                   id invocation.
  1433. * -g:                                   stty invocation.
  1434. * -ge:                                  Numeric tests.
  1435. * -gt:                                  Numeric tests.
  1436. * -h:                                   File type tests.
  1437. * -H:                                   who invocation.
  1438. * -i:                                   tee invocation.
  1439. * -i:                                   who invocation.
  1440. * -i:                                   env invocation.
  1441. * -k:                                   Access permission tests.
  1442. * -L:                                   File type tests.
  1443. * -l:                                   su invocation.
  1444. * -le:                                  Numeric tests.
  1445. * -lt:                                  Numeric tests.
  1446. * -m:                                   su invocation.
  1447. * -m:                                   who invocation.
  1448. * -m:                                   uname invocation.
  1449. * -n:                                   String tests.
  1450. * -n:                                   echo invocation.
  1451. * -n:                                   id invocation.
  1452. * -n:                                   uname invocation.
  1453. * -n:                                   nice invocation.
  1454. * -ne:                                  Numeric tests.
  1455. * -nt:                                  File characteristics tests.
  1456. * -O:                                   Access permission tests.
  1457. * -o:                                   Connectives for test.
  1458. * -ot:                                  File characteristics tests.
  1459. * -p:                                   su invocation.
  1460. * -p:                                   File type tests.
  1461. * -p:                                   pathchk invocation.
  1462. * -q:                                   who invocation.
  1463. * -r:                                   id invocation.
  1464. * -r:                                   Access permission tests.
  1465. * -r:                                   uname invocation.
  1466. * -s:                                   File characteristics tests.
  1467. * -s:                                   who invocation.
  1468. * -S:                                   File type tests.
  1469. * -s:                                   uname invocation.
  1470. * -s:                                   Options for date.
  1471. * -s:                                   su invocation.
  1472. * -s:                                   tty invocation.
  1473. * -t:                                   File type tests.
  1474. * -T:                                   who invocation.
  1475. * -u:                                   Options for date.
  1476. * -u:                                   env invocation.
  1477. * -u:                                   Access permission tests.
  1478. * -u:                                   who invocation.
  1479. * -u:                                   id invocation.
  1480. * -unset:                               env invocation.
  1481. * -v:                                   uname invocation.
  1482. * -w:                                   who invocation.
  1483. * -w:                                   Access permission tests.
  1484. * -x:                                   Access permission tests.
  1485. * -z:                                   String tests.
  1486. * .cshrc:                               su invocation.
  1487. * /:                                    Numeric expressions.
  1488. * /bin/sh:                              su invocation.
  1489. * /etc/passwd:                          su invocation.
  1490. * /etc/shells:                          su invocation.
  1491. * /etc/utmp:                            who invocation.
  1492. * /etc/utmp:                            users invocation.
  1493. * /etc/utmp:                            logname invocation.
  1494. * /etc/wtmp:                            users invocation.
  1495. * /etc/wtmp:                            who invocation.
  1496. * <:                                    Relations for expr.
  1497. * <=:                                   Relations for expr.
  1498. * =:                                    String tests.
  1499. * =:                                    Relations for expr.
  1500. * ==:                                   Relations for expr.
  1501. * >:                                    Relations for expr.
  1502. * >=:                                   Relations for expr.
  1503. * date options:                         Options for date.
  1504. * -su:                                  su invocation.
  1505. * access permission tests:              Access permission tests.
  1506. * addition:                             Numeric expressions.
  1507. * am i:                                 who invocation.
  1508. * and operator:                         Connectives for test.
  1509. * and operator:                         Relations for expr.
  1510. * appropriate privileges:               hostname invocation.
  1511. * appropriate privileges:               nice invocation.
  1512. * appropriate privileges:               Setting the time.
  1513. * arbitrary date strings, parsing:      Options for date.
  1514. * arbitrary text, displaying:           echo invocation.
  1515. * arithmetic tests:                     Numeric tests.
  1516. * background jobs, stopping at terminal write: Local.
  1517. * backslash escapes:                    echo invocation.
  1518. * basename:                             basename invocation.
  1519. * baud rate, setting:                   Special.
  1520. * beeping at input buffer full:         Input.
  1521. * beginning of time:                    Time directives.
  1522. * block special check:                  File type tests.
  1523. * breaks, cause interrupts:             Input.
  1524. * breaks, ignoring:                     Input.
  1525. * brkint:                               Input.
  1526. * bsN:                                  Output.
  1527. * bugs, reporting:                      Introduction.
  1528. * built-in shell commands, conflicts with: nice invocation.
  1529. * built-in shell commands, conflicts with: pwd invocation.
  1530. * built-in shell commands, conflicts with: test invocation.
  1531. * C-s/C-q flow control:                 Input.
  1532. * case translation:                     Local.
  1533. * cbreak:                               Combination.
  1534. * change or print terminal settings:    stty invocation.
  1535. * character size:                       Control.
  1536. * character special check:              File type tests.
  1537. * characters, special:                  Characters.
  1538. * check file types:                     test invocation.
  1539. * clocal:                               Control.
  1540. * cols:                                 Special.
  1541. * columns:                              Special.
  1542. * COLUMNS:                              Special.
  1543. * combination settings:                 Combination.
  1544. * commands for delaying:                Delaying.
  1545. * commands for exit status:             Conditions.
  1546. * commands for file name manipulation:  File name manipulation.
  1547. * commands for invoking other commands: Modified command invocation.
  1548. * commands for printing text:           Printing text.
  1549. * commands for printing the working context: Working context information.
  1550. * commands for printing user information: User information.
  1551. * commands for redirection:             Redirection.
  1552. * commands for system context:          System context.
  1553. * common options:                       Common options.
  1554. * compare values:                       test invocation.
  1555. * comparison operators:                 Relations for expr.
  1556. * conditions:                           Conditions.
  1557. * conflicts with shell built-ins:       nice invocation.
  1558. * conflicts with shell built-ins:       pwd invocation.
  1559. * conflicts with shell built-ins:       test invocation.
  1560. * connectives, logical:                 Relations for expr.
  1561. * connectives, logical:                 Connectives for test.
  1562. * context, system:                      System context.
  1563. * control characters, using ^C:         Local.
  1564. * control settings:                     Control.
  1565. * cooked:                               Combination.
  1566. * coordinated universal time:           Options for date.
  1567. * crN:                                  Output.
  1568. * cread:                                Control.
  1569. * crt:                                  Combination.
  1570. * crterase:                             Local.
  1571. * crtkill:                              Local.
  1572. * crtscts:                              Control.
  1573. * csN:                                  Control.
  1574. * cstopb:                               Control.
  1575. * ctlecho:                              Local.
  1576. * current working directory, printing:  pwd invocation.
  1577. * date:                                 date invocation.
  1578. * date directives:                      Date directives.
  1579. * date strings, parsing:                Options for date.
  1580. * dec:                                  Combination.
  1581. * decctlq:                              Combination.
  1582. * delay for a specified time:           sleep invocation.
  1583. * delaying commands:                    Delaying.
  1584. * destinations, multiple output:        tee invocation.
  1585. * directives, date:                     Date directives.
  1586. * directives, literal:                  Literal directives.
  1587. * directives, time:                     Time directives.
  1588. * directory check:                      File type tests.
  1589. * directory components, printing:       dirname invocation.
  1590. * directory, stripping from file names: basename invocation.
  1591. * dirname:                              dirname invocation.
  1592. * disabling special characters:         Characters.
  1593. * displaying text:                      echo invocation.
  1594. * division:                             Numeric expressions.
  1595. * do nothing, successfully:             true invocation.
  1596. * dsusp:                                Characters.
  1597. * echo:                                 Local.
  1598. * echo:                                 echo invocation.
  1599. * echoctl:                              Local.
  1600. * echoe:                                Local.
  1601. * echok:                                Local.
  1602. * echoke:                               Local.
  1603. * echonl:                               Local.
  1604. * echoprt:                              Local.
  1605. * effective uid and gid, printing:      id invocation.
  1606. * effective UID, printing:              whoami invocation.
  1607. * eight-bit characters:                 Combination.
  1608. * eight-bit characters:                 Control.
  1609. * eight-bit input:                      Input.
  1610. * ek:                                   Combination.
  1611. * env:                                  env invocation.
  1612. * environment variables, printing:      printenv invocation.
  1613. * environment, preserving:              su invocation.
  1614. * environment, printing:                env invocation.
  1615. * environment, running a program in a modified: env invocation.
  1616. * eof:                                  Characters.
  1617. * eol:                                  Characters.
  1618. * eol2:                                 Characters.
  1619. * epoch, seconds since:                 Time directives.
  1620. * equal string check:                   String tests.
  1621. * erase:                                Characters.
  1622. * evaluation of expressions:            expr invocation.
  1623. * even parity:                          Control.
  1624. * evenp:                                Combination.
  1625. * examples of date:                     Examples of date.
  1626. * examples of expr:                     Examples of expr.
  1627. * executable file check:                Access permission tests.
  1628. * existence-of-file check:              File characteristics tests.
  1629. * exit status commands:                 Conditions.
  1630. * exit status of expr:                  expr invocation.
  1631. * exit status of pathchk:               pathchk invocation.
  1632. * exit status of printenv:              printenv invocation.
  1633. * exit status of true:                  true invocation.
  1634. * exit status of true:                  false invocation.
  1635. * exit status of tty:                   tty invocation.
  1636. * expr:                                 expr invocation.
  1637. * expression evaluation:                test invocation.
  1638. * expression evaluation:                expr invocation.
  1639. * expressions, numeric:                 Numeric expressions.
  1640. * expressions, string:                  String expressions.
  1641. * failure exit status:                  false invocation.
  1642. * false:                                false invocation.
  1643. * fascism:                              su invocation.
  1644. * ffN:                                  Output.
  1645. * fields, padding numeric:              date invocation.
  1646. * file characteristics tests:           File characteristics tests.
  1647. * file name manipulation:               File name manipulation.
  1648. * file name pattern expansion, disabled: su invocation.
  1649. * file names, checking validity and portability: pathchk invocation.
  1650. * file names, stripping directory and suffix: basename invocation.
  1651. * file type tests:                      File type tests.
  1652. * flow control, hardware:               Control.
  1653. * flow control, software:               Input.
  1654. * flushing, disabling:                  Local.
  1655. * formatting times:                     date invocation.
  1656. * getdate.y:                            Options for date.
  1657. * globbing, disabled:                   su invocation.
  1658. * Greenwich Mean Time:                  Options for date.
  1659. * group wheel, not supported:           su invocation.
  1660. * groups:                               groups invocation.
  1661. * hangups, immunity to:                 nohup invocation.
  1662. * hard link check:                      File characteristics tests.
  1663. * hardware flow control:                Control.
  1664. * hardware type:                        uname invocation.
  1665. * hat notation for control characters:  Local.
  1666. * help, online:                         Common options.
  1667. * history:                              Introduction.
  1668. * HOME:                                 su invocation.
  1669. * hostname:                             hostname invocation.
  1670. * hostname:                             uname invocation.
  1671. * hup[cl]:                              Control.
  1672. * icanon:                               Local.
  1673. * icrnl:                                Input.
  1674. * id:                                   id invocation.
  1675. * idle time:                            who invocation.
  1676. * iexten:                               Local.
  1677. * ignbrk:                               Input.
  1678. * igncr:                                Input.
  1679. * ignpar:                               Input.
  1680. * imaxbel:                              Input.
  1681. * immunity to hangups:                  nohup invocation.
  1682. * index:                                String expressions.
  1683. * information, about current users:     who invocation.
  1684. * inlcr:                                Input.
  1685. * inpck:                                Input.
  1686. * input settings:                       Input.
  1687. * intr:                                 Characters.
  1688. * introduction:                         Introduction.
  1689. * invocation of commands, modified:     Modified command invocation.
  1690. * isig:                                 Local.
  1691. * ispeed:                               Special.
  1692. * istrip:                               Input.
  1693. * iuclc:                                Input.
  1694. * ixany:                                Input.
  1695. * ixoff:                                Input.
  1696. * ixon:                                 Input.
  1697. * kill:                                 Characters.
  1698. * last DAY:                             Options for date.
  1699. * LCASE:                                Combination.
  1700. * lcase:                                Combination.
  1701. * leading directory components, stripping: basename invocation.
  1702. * length:                               String expressions.
  1703. * line:                                 Special.
  1704. * line settings of terminal:            stty invocation.
  1705. * LINES:                                Special.
  1706. * literal directives:                   Literal directives.
  1707. * litout:                               Combination.
  1708. * lnext:                                Characters.
  1709. * local settings:                       Local.
  1710. * logical and operator:                 Relations for expr.
  1711. * logical and operator:                 Connectives for test.
  1712. * logical connectives:                  Relations for expr.
  1713. * logical connectives:                  Connectives for test.
  1714. * logical or operator:                  Relations for expr.
  1715. * logical or operator:                  Connectives for test.
  1716. * login name, printing:                 logname invocation.
  1717. * login sessions, printing users with:  users invocation.
  1718. * login shell:                          su invocation.
  1719. * login shell, creating:                su invocation.
  1720. * login time:                           who invocation.
  1721. * logname:                              logname invocation.
  1722. * LOGNAME:                              su invocation.
  1723. * lowercase, translating to output:     Output.
  1724. * machine type:                         uname invocation.
  1725. * machine-readable stty output:         stty invocation.
  1726. * manipulation of file names:           File name manipulation.
  1727. * match:                                String expressions.
  1728. * matching patterns:                    String expressions.
  1729. * message status:                       who invocation.
  1730. * min:                                  Special.
  1731. * MIT AI lab:                           su invocation.
  1732. * modem control:                        Control.
  1733. * modified command invocation:          Modified command invocation.
  1734. * modified environment, running a program in: env invocation.
  1735. * modifying scheduling priority:        nice invocation.
  1736. * multiplication:                       Numeric expressions.
  1737. * name of operating system:             uname invocation.
  1738. * named pipe check:                     File type tests.
  1739. * network node name:                    uname invocation.
  1740. * newer-than file check:                File characteristics tests.
  1741. * newline echoing after kill:           Local.
  1742. * newline, echoing:                     Local.
  1743. * newline, translating to crlf:         Output.
  1744. * newline, translating to return:       Input.
  1745. * next DAY:                             Options for date.
  1746. * nice:                                 nice invocation.
  1747. * nl:                                   Combination.
  1748. * nlN:                                  Output.
  1749. * no-op:                                true invocation.
  1750. * node name:                            uname invocation.
  1751. * noflsh:                               Local.
  1752. * nohup:                                nohup invocation.
  1753. * nohup.out:                            nohup invocation.
  1754. * nohup.out:                            nohup invocation.
  1755. * non-directory suffix, stripping:      dirname invocation.
  1756. * nonempty file check:                  File characteristics tests.
  1757. * nonzero-length string check:          String tests.
  1758. * not-equal string check:               String tests.
  1759. * numeric expressions:                  Numeric expressions.
  1760. * numeric field padding:                date invocation.
  1761. * numeric tests:                        Numeric tests.
  1762. * ocrnl:                                Output.
  1763. * odd parity:                           Control.
  1764. * oddp:                                 Combination.
  1765. * ofdel:                                Output.
  1766. * ofill:                                Output.
  1767. * olcuc:                                Output.
  1768. * older-than file check:                File characteristics tests.
  1769. * onlcr:                                Output.
  1770. * onlret:                               Output.
  1771. * onocr:                                Output.
  1772. * operating system name:                uname invocation.
  1773. * operating system release:             uname invocation.
  1774. * operating system version:             uname invocation.
  1775. * opost:                                Output.
  1776. * options for date:                     Options for date.
  1777. * or operator:                          Relations for expr.
  1778. * or operator:                          Connectives for test.
  1779. * ospeed:                               Special.
  1780. * output settings:                      Output.
  1781. * owned by effective gid check:         Access permission tests.
  1782. * owned by effective uid check:         Access permission tests.
  1783. * pad character:                        Output.
  1784. * pad instead of timing for delaying:   Output.
  1785. * padding of numeric fields:            date invocation.
  1786. * parenb:                               Control.
  1787. * parentheses for grouping:             expr invocation.
  1788. * parity:                               Combination.
  1789. * parity errors, marking:               Input.
  1790. * parity, ignoring:                     Input.
  1791. * parmrk:                               Input.
  1792. * parodd:                               Control.
  1793. * parsing date strings:                 Options for date.
  1794. * pass8:                                Combination.
  1795. * passwd entry, and su shell:           su invocation.
  1796. * PATH:                                 env invocation.
  1797. * PATH:                                 su invocation.
  1798. * pathchk:                              pathchk invocation.
  1799. * pattern matching:                     String expressions.
  1800. * permission tests:                     Access permission tests.
  1801. * pipe fitting:                         tee invocation.
  1802. * portable file names, checking for:    pathchk invocation.
  1803. * POSIX.2:                              Introduction.
  1804. * print name of current directory:      pwd invocation.
  1805. * print system information:             uname invocation.
  1806. * print terminal file name:             tty invocation.
  1807. * printenv:                             printenv invocation.
  1808. * printf:                               printf invocation.
  1809. * printing all or some environment variables: printenv invocation.
  1810. * printing current user information:    who invocation.
  1811. * printing current usernames:           users invocation.
  1812. * printing groups a user is in:         groups invocation.
  1813. * printing real and effective uid and gid: id invocation.
  1814. * printing text:                        echo invocation.
  1815. * printing text, commands for:          Printing text.
  1816. * printing the current time:            date invocation.
  1817. * printing the effective UID:           whoami invocation.
  1818. * printing the hostname:                hostname invocation.
  1819. * printing user's login name:           logname invocation.
  1820. * priority, modifying:                  nice invocation.
  1821. * prterase:                             Local.
  1822. * pwd:                                  pwd invocation.
  1823. * quit:                                 Characters.
  1824. * raw:                                  Combination.
  1825. * read from stdin and write to stdout and files: tee invocation.
  1826. * readable file check:                  Access permission tests.
  1827. * real uid and gid, printing:           id invocation.
  1828. * redirection:                          Redirection.
  1829. * regular expression matching:          String expressions.
  1830. * regular file check:                   File type tests.
  1831. * relations, numeric or string:         Relations for expr.
  1832. * release of operating system:          uname invocation.
  1833. * remainder:                            Numeric expressions.
  1834. * remote hostname:                      who invocation.
  1835. * repeated output of a string:          yes invocation.
  1836. * restricted shell:                     su invocation.
  1837. * return, ignoring:                     Input.
  1838. * return, translating to newline:       Output.
  1839. * return, translating to newline:       Input.
  1840. * root, becoming:                       su invocation.
  1841. * rows:                                 Special.
  1842. * rprnt:                                Characters.
  1843. * RTS/CTS flow control:                 Control.
  1844. * same file check:                      File characteristics tests.
  1845. * sane:                                 Combination.
  1846. * scheduling priority, modifying:       nice invocation.
  1847. * seconds since the epoch:              Time directives.
  1848. * set-group-id check:                   Access permission tests.
  1849. * set-user-id check:                    Access permission tests.
  1850. * setting the hostname:                 hostname invocation.
  1851. * setting the time:                     Setting the time.
  1852. * SHELL:                                su invocation.
  1853. * shell utilities:                      Top.
  1854. * size:                                 Special.
  1855. * sleep:                                sleep invocation.
  1856. * socket check:                         File type tests.
  1857. * software flow control:                Input.
  1858. * special characters:                   Characters.
  1859. * special settings:                     Special.
  1860. * speed:                                Special.
  1861. * start:                                Characters.
  1862. * sticky bit check:                     Access permission tests.
  1863. * stop:                                 Characters.
  1864. * stop bits:                            Control.
  1865. * strftime and date:                    date invocation.
  1866. * string expressions:                   String expressions.
  1867. * string tests:                         String tests.
  1868. * strip directory and suffix from file names: basename invocation.
  1869. * stripping non-directory suffix:       dirname invocation.
  1870. * stty:                                 stty invocation.
  1871. * su:                                   su invocation.
  1872. * substitute user and group ids:        su invocation.
  1873. * substr:                               String expressions.
  1874. * subtraction:                          Numeric expressions.
  1875. * successful exit:                      true invocation.
  1876. * suffix, stripping from file names:    basename invocation.
  1877. * super-user, becoming:                 su invocation.
  1878. * supplementary groups, printing:       groups invocation.
  1879. * susp:                                 Characters.
  1880. * swtch:                                Characters.
  1881. * symbolic link check:                  File type tests.
  1882. * symbolic links and pwd:               pwd invocation.
  1883. * syslog:                               su invocation.
  1884. * system context:                       System context.
  1885. * system information, printing:         uname invocation.
  1886. * system name, printing:                hostname invocation.
  1887. * tabN:                                 Output.
  1888. * tabs:                                 Combination.
  1889. * tandem:                               Input.
  1890. * tee:                                  tee invocation.
  1891. * TERM:                                 su invocation.
  1892. * terminal check:                       File type tests.
  1893. * terminal file name, printing:         tty invocation.
  1894. * terminal lines, currently used:       who invocation.
  1895. * terminal settings:                    stty invocation.
  1896. * test:                                 test invocation.
  1897. * text, displaying:                     echo invocation.
  1898. * time:                                 Special.
  1899. * time directives:                      Time directives.
  1900. * time formats:                         date invocation.
  1901. * time setting:                         Setting the time.
  1902. * time units:                           sleep invocation.
  1903. * time, printing or setting:            date invocation.
  1904. * tomorrow:                             Options for date.
  1905. * tostop:                               Local.
  1906. * true:                                 true invocation.
  1907. * tty:                                  tty invocation.
  1908. * Twenex:                               su invocation.
  1909. * two-way parity:                       Control.
  1910. * u, and disabling special characters:  Characters.
  1911. * uname:                                uname invocation.
  1912. * uppercase, translating to lowercase:  Input.
  1913. * USER:                                 su invocation.
  1914. * user id, switching:                   su invocation.
  1915. * user information, commands for:       User information.
  1916. * user name, printing:                  logname invocation.
  1917. * usernames, printing current:          users invocation.
  1918. * users:                                users invocation.
  1919. * utilities for shell programming:      Top.
  1920. * utmp:                                 logname invocation.
  1921. * valid file names, checking for:       pathchk invocation.
  1922. * version number, finding:              Common options.
  1923. * version of operating system:          uname invocation.
  1924. * vtN:                                  Output.
  1925. * werase:                               Characters.
  1926. * wheel group, not supported:           su invocation.
  1927. * who:                                  who invocation.
  1928. * who am i:                             who invocation.
  1929. * whoami:                               whoami invocation.
  1930. * working context:                      Working context information.
  1931. * working directory, printing:          pwd invocation.
  1932. * writable file check:                  Access permission tests.
  1933. * write, allowed:                       who invocation.
  1934. * xcase:                                Local.
  1935. * XON/XOFF flow control:                Input.
  1936. * yes:                                  yes invocation.
  1937. * yesterday:                            Options for date.
  1938. * zero-length string check:             String tests.
  1939. * \0ooo:                                printf invocation.
  1940. * \0xhhh:                               printf invocation.
  1941. * \c:                                   printf invocation.
  1942. * |:                                    Relations for expr.
  1943. Tag Table:
  1944. Node: Top
  1945. Node: Introduction
  1946. Node: Common options
  1947. Node: Printing text
  1948. Node: echo invocation
  1949. Node: printf invocation
  1950. Node: yes invocation
  1951. Node: Conditions
  1952. Node: false invocation
  1953. Node: true invocation
  1954. Node: test invocation
  1955. 10144
  1956. Node: File type tests
  1957. 11284
  1958. Node: Access permission tests
  1959. 12075
  1960. Node: File characteristics tests
  1961. 12840
  1962. Node: String tests
  1963. 13507
  1964. Node: Numeric tests
  1965. 14089
  1966. Node: Connectives for test
  1967. 14873
  1968. Node: expr invocation
  1969. 15213
  1970. Node: Relations for expr
  1971. 16354
  1972. Node: Numeric expressions
  1973. 17048
  1974. Node: String expressions
  1975. 17646
  1976. Node: Examples of expr
  1977. 19350
  1978. Node: Redirection
  1979. 19932
  1980. Node: tee invocation
  1981. 20373
  1982. Node: File name manipulation
  1983. 21201
  1984. Node: basename invocation
  1985. 21657
  1986. Node: dirname invocation
  1987. 22221
  1988. Node: pathchk invocation
  1989. 22735
  1990. Node: Working context information
  1991. 23898
  1992. Node: pwd invocation
  1993. 24574
  1994. Node: stty invocation
  1995. 25186
  1996. Node: Control
  1997. 27095
  1998. Node: Input
  1999. 27843
  2000. Node: Output
  2001. 29200
  2002. Node: Local
  2003. 30444
  2004. Node: Combination
  2005. 32011
  2006. Node: Characters
  2007. 34149
  2008. Node: Special
  2009. 35689
  2010. Node: printenv invocation
  2011. 37027
  2012. Node: tty invocation
  2013. 37750
  2014. Node: User information
  2015. 38445
  2016. Node: id invocation
  2017. 39105
  2018. Node: logname invocation
  2019. 40248
  2020. Node: whoami invocation
  2021. 40751
  2022. Node: groups invocation
  2023. 41145
  2024. Node: users invocation
  2025. 41791
  2026. Node: who invocation
  2027. 42603
  2028. Node: System context
  2029. 44320
  2030. Node: date invocation
  2031. 44743
  2032. Node: Time directives
  2033. 46107
  2034. Node: Date directives
  2035. 46761
  2036. Node: Literal directives
  2037. 47758
  2038. Node: Setting the time
  2039. 48042
  2040. Node: Options for date
  2041. 49017
  2042. Node: Examples of date
  2043. 50197
  2044. Node: uname invocation
  2045. 51482
  2046. Node: hostname invocation
  2047. 52587
  2048. Node: Modified command invocation
  2049. 53086
  2050. Node: env invocation
  2051. 53653
  2052. Node: nice invocation
  2053. 54916
  2054. Node: nohup invocation
  2055. 56042
  2056. Node: su invocation
  2057. 57165
  2058. Node: Delaying
  2059. 61441
  2060. Node: sleep invocation
  2061. 61698
  2062. Node: Index
  2063. 62230
  2064. End Tag Table
  2065.