@ifinfo
@format
START-INFO-DIR-ENTRY
-* Shell utilities: (sh-utils). basename date dirname echo env expr false
- groups hostname id logname pathchk printenv printf
- pwd sleep su tee test true tty users who whoami yes
+* Shell utilities: (sh-utils).
+ GNU set of shell utilities.
+* basename invocation: (sh-utils)basename invocation.
+ Strip directory and suffix from a filename.
+* date invocation: (sh-utils)date invocation.
+ Print or set system date and time.
+* dirname invocation: (sh-utils)dirname invocation.
+ Strip non-directory suffix from file name.
+* echo invocation: (sh-utils)echo invocation.
+ Print a line of text.
+* env invocation: (sh-utils)env invocation.
+ Modify the environment.
+* expr invocation: (sh-utils)expr invocation.
+ Evaluate expressions.
+* false invocation: (sh-utils)false invocation.
+ Do nothing, unsuccessfully.
+* groups invocation: (sh-utils)groups invocation.
+ Print group names a user is in.
+* hostname invocation: (sh-utils)hostname invocation.
+ Print or set system name.
+* id invocation: (sh-utils)id invocation.
+ Print real and effective uid and gid.
+* logname invocation: (sh-utils)logname invocation.
+ Print current login name.
+* nice invocation: (sh-utils)nice invocation.
+ Modify the scheduling priority.
+* pathchk invocation: (sh-utils)pathchk invocation.
+ Check file name portability.
+* printenv invocation: (sh-utils)printenv invocation.
+ Print all or part of the environment.
+* printf invocation: (sh-utils)printf invocation.
+ Format and print data.
+* pwd invocation: (sh-utils)pwd invocation.
+ Print working directory.
+* sleep invocation: (sh-utils)sleep invocation.
+ Delay for a specified time.
+* stty invocation: (sh-utils)stty invocation.
+ Print or change terminal characteristics.
+* su invocation: (sh-utils)su invocation.
+ Modify the user and group id.
+* tee invocation: (sh-utils)tee invocation.
+ Redirect output to multiple files.
+* test invocation: (sh-utils)test invocation.
+ Check file types and compare values.
+* true invocation: (sh-utils)true invocation.
+ Do nothing, successfully.
+* tty invocation: (sh-utils)tty invocation.
+ Print or change terminal characteristics.
+* uname invocation: (sh-utils)uname invocation.
+ Print system information.
+* users invocation: (sh-utils)users invocation.
+ Print login names of users currently logged in.
+* who invocation: (sh-utils)who invocation.
+ Print who is currently logged in.
+* whoami invocation: (sh-utils)whoami invocation.
+ Print effective user id.
+* yes invocation: (sh-utils)yes invocation.
+ Print a string until interrupted.
END-INFO-DIR-ENTRY
@end format
@end ifinfo
@code{echo} writes each given @var{string} to standard output, with a
space between each and a newline after the last one.
-The program accepts the following options. Also @pxref{Common options}.
+The program accepts the following options. Also see @ref{Common
+options}.
@table @samp
@item -n
+@opindex -n
Do not output the trailing newline.
@item -e
+@opindex -e
@cindex backslash escapes
Enable interpretation of the following backslash-escaped characters in
each @var{string}:
-@table @code
+@table @samp
@item \a
alert (bell)
@item \b
further output.
The only options are a lone @samp{--help} or
-@samp{--version}. @xref{Common options}).
+@samp{--version}. @xref{Common options}).
@node yes invocation
given, it prints @samp{y} followed by a newline forever until killed.
The only options are a lone @samp{--help} or
-@samp{--version}. @xref{Common options}).
+@samp{--version}. @xref{Common options}).
@node Conditions
different functionality than that described here.
Besides the options below, @code{test} accepts a lone @samp{--help} or
-@samp{--version}. @xref{Common options}). A single non-option argument
+@samp{--version}. @xref{Common options}). A single non-option argument
is also allowed: @code{test} returns true if the argument is not null.
@menu
String operators. These have lowest precedence.
-@table @code
+@table @samp
@item @var{string} : @var{regex}
@cindex pattern matching
@cindex read from stdin and write to stdout and files
The @code{tee} command copies standard input to standard output and also
-to any files given as arguments. This is useful when you want not only
+to any files given as arguments. This is useful when you not only want
to send some data down a pipe, but also to save a copy.
Synopsis:
file being written to already exists, the data it previously contained
is overwritten unless the @code{-a} option is used.
-The program accepts the following options. Also @pxref{Common options}.
+The program accepts the following options. Also see @ref{Common
+options}.
@table @samp
@item -a
to the end of @var{name}, it is removed from @var{name} as well.
@code{basename} prints the result on standard output.
-The only options are @samp{--help} and @samp{--version}. @xref{Common
+The only options are @samp{--help} and @samp{--version}. @xref{Common
options}).
of @var{name}. If @var{name} is a single component,
@code{dirname} prints @samp{.} (meaning the current directory).
-The only options are @samp{--help} and @samp{--version}. @xref{Common
+The only options are @samp{--help} and @samp{--version}. @xref{Common
options}).
length for a file name component.
@end enumerate
-The program accepts the following option. Also @pxref{Common options}.
+The program accepts the following option. Also see @ref{Common
+options}.
@table @samp
different functionality than that described here.
The only options are a lone @samp{--help} or
-@samp{--version}. @xref{Common options}).
+@samp{--version}. @xref{Common options}).
@node stty invocation
stty [ @var{option} ]
@end example
-The program accepts the following options. Also @pxref{Common options}.
+The program accepts the following options. Also see @ref{Common
+options}.
@table @samp
@item -a
@cindex control settings
Control settings:
-@table @code
+@table @samp
@item parenb
@opindex parenb
@cindex two-way parity
@opindex crtscts
@cindex hardware flow control
@cindex flow control, hardware
-Enable RTS/CTS handshaking. Non-POSIX. May be negated.
+Enable @code{RTS}/@code{CTS} handshaking. Non-POSIX. May be negated.
@end table
@cindex input settings
-@table @code
+@table @samp
@item ignbrk
@opindex ignbrk
@cindex breaks, ignoring
@item ixon
@opindex ixon
@kindex C-s/C-q flow control
-@cindex XON/XOFF flow control
-Enable XON/XOFF flow control. May be negated.
+@cindex @code{XON}/@code{XOFF} flow control
+Enable @code{XON}/@code{XOFF} flow control. May be negated.
@item ixoff
@itemx tandem
@cindex output settings
These arguments specify output-related operations.
-@table @code
+@table @samp
@item opost
@opindex opost
Postprocess output. May be negated.
@cindex local settings
-@table @code
+@table @samp
@item isig
@opindex isig
Enable @code{interrupt}, @code{quit}, and @code{suspend} special
@cindex combination settings
Combination settings:
-@table @code
+@table @samp
@item evenp
@opindex evenp
@itemx parity
any other digit to indicate decimal. Giving a value of @code{^-} or
@code{undef} disables that special character.
-@table @code
+@table @samp
@item intr
@opindex intr
Send an interrupt signal.
@cindex special settings
-@table @code
+@table @samp
@item min @var{n}
@opindex min
Set the minimum number of characters that will satisfy a read until
is set, and nothing for those that are not set.
The only options are a lone @samp{--help} or
-@samp{--version}. @xref{Common options}).
+@samp{--version}. @xref{Common options}).
@cindex exit status of @code{printenv}
Exit status:
tty [ @var{option} ]@dots{}
@end example
-The program accepts the following option. Also @pxref{Common options}.
+The program accepts the following option. Also see @ref{Common
+options}.
@table @samp
Each of these numeric values is preceded by an identifying string and
followed by the corresponding user or group name in parentheses.
-The options cause @code{id} to print only part of the above information.
-Also @pxref{Common options}.
+The options cause @code{id} to print only part of the above
+information. Also see @ref{Common options}.
@table @samp
@item -g
@file{/etc/utmp} entry for the calling process, @code{logname} prints
an error message and exits with a status of 1.
-The only options are @samp{--help} and @samp{--version}. @xref{Common
+The only options are @samp{--help} and @samp{--version}. @xref{Common
options}).
@code{whoami} prints the user name associated with the current
effective user id. It is equivalent to the command @samp{id -un}.
-The only options are @samp{--help} and @samp{--version}. @xref{Common
+The only options are @samp{--help} and @samp{--version}. @xref{Common
options}).
The group lists are equivalent to the output of the command @samp{id -Gn}.
-The only options are @samp{--help} and @samp{--version}. @xref{Common
+The only options are @samp{--help} and @samp{--version}. @xref{Common
options}).
the file @file{/etc/utmp}. If a file argument is given, @code{users}
uses that file instead. A common choice is @file{/etc/wtmp}.
-The only options are @samp{--help} and @samp{--version}. @xref{Common
+The only options are @samp{--help} and @samp{--version}. @xref{Common
options}).
by the hostname. Traditionally, the two arguments given are @samp{am
i}, as in @samp{who am i}.
-The program accepts the following options. Also @pxref{Common options}.
+The program accepts the following options. Also see @ref{Common
+options}.
@table @samp
@item -m
@example
date [ @var{option} ]@dots{} [ +@var{format} ] @c
-date [ @var{option} ] [@var{MMDDhhmm}[[@var{CC}]@var{YY}][.@var{ss}] ]
+[@var{MMDDhhmm}[[@var{CC}]@var{YY}][.@var{ss}] ]
@end example
@findex strftime @r{and @code{date}}
@cindex @code{date} options
@cindex options for @code{date}
-The program accepts the following options. Also @pxref{Common options}.
+The program accepts the following options. Also see @ref{Common
+options}.
@table @samp
@cindex date strings, parsing
@cindex arbitrary date strings, parsing
Display the time and date specified in @var{datestr} instead of the
-current time and date. @var{datestr} can be in almost any common format.
+current time and date. @var{datestr} can be in almost any common format.
@item -s @var{datestr}
@itemx --set=@var{datestr}
uname [ @var{option} ]@dots{}
@end example
-The program accepts the following options. Also @pxref{Common options}.
+The program accepts the following options. Also see @ref{Common
+options}.
@table @samp
@item -m
hostname [ @var{name} ]
@end example
-The only options are @samp{--help} and @samp{--version}. @xref{Common
+The only options are @samp{--help} and @samp{--version}. @xref{Common
options}).
@var{value} may be empty (@samp{@var{variable}=}). Setting a variable
to an empty value is different from unsetting it.
+@vindex PATH
The first remaining argument specifies the program name to invoke; it is
searched for according to the @code{PATH} environment variable. Any
remaining arguments are passed as arguments to that program.
specifications, the resulting environment is printed. This is like
specifying a command name of @code{printenv}.
-The program accepts the following options. Also @pxref{Common options}.
+The program accepts the following options. Also see @ref{Common
+options}.
@table @samp
unadorned command name in a script or interactively may get you
different functionality than that described here.
-The program accepts the following option. Also @pxref{Common options}.
+The program accepts the following option. Also see @ref{Common
+options}.
@table @samp
@item -n @var{adjustment}
nohup @var{command} [ @var{arg} ]@dots{}
@end example
-Also, the scheduling priority is increased by 5. If standard output is a
+Also, the scheduling priority is increased by 5. If standard output is a
tty, it and standard error are redirected so that they are appended to
the file @file{nohup.out}; if that cannot be written to, they are
appended to the file @file{$HOME/nohup.out}. If that cannot be written
to, the command is not run.
+@flindex nohup.out
If @code{nohup} creates either @file{nohup.out} or
@file{$HOME/nohup.out}, it creates it with no ``group'' or ``other''
access permissions. It does not change the permissions if the output
background; you must do that explicitly, by ending the command line
with an @samp{&}.
-The only options are @samp{--help} and @samp{--version}. @xref{Common
+The only options are @samp{--help} and @samp{--version}. @xref{Common
options}).
can @code{su} to super-user accounts, because that can help fascist
system administrators hold unwarranted power over other users.
-The program accepts the following options. Also @pxref{Common options}.
+The program accepts the following options. Also see @ref{Common
+options}.
@table @samp
@item -c @var{command}
Each argument is a number followed by an optional unit; the default
is seconds. The units are:
-@table @code
+@table @samp
@item s
seconds
@item m
days
@end table
-The only options are @samp{--help} and @samp{--version}. @xref{Common
+The only options are @samp{--help} and @samp{--version}. @xref{Common
options}).