summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-11-09 15:49:44 -0700
committerEric Blake <ebb9@byu.net>2009-11-10 05:56:22 -0700
commit622cf39be6dd25a1913ef85ac66290217f1af5b6 (patch)
treeeb1241c273a0c0688b40973ac568dd061e61911e
parent3aff3ed137452ab9b6a08a4de0bcb4e578d6bae6 (diff)
downloadcoreutils-622cf39be6dd25a1913ef85ac66290217f1af5b6.tar.xz
doc: fix typo
* doc/coreutils.texi (mktemp invocation): Quote shell variable.
-rw-r--r--doc/coreutils.texi15
1 files changed, 8 insertions, 7 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 3fc3a52ca..3721beea4 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -12127,7 +12127,7 @@ directory or fifo could not be created.
@example
$ dir=$(mktemp -p "$@{TMPDIR:-.@}" -d dir-XXXX) || exit 1
$ fifo=$dir/fifo
-$ mkfifo "$fifo" || @{ rmdir $dir; exit 1; @}
+$ mkfifo "$fifo" || @{ rmdir "$dir"; exit 1; @}
@end example
@item
@@ -12136,9 +12136,10 @@ file will reside in the directory named by @env{TMPDIR}, if specified,
or else in @file{/tmp}.
@example
$ file=$(mktemp -q) && @{
-> # Safe to use $file only within this block
-> echo ... > $file
-> rm $file
+> # Safe to use $file only within this block. Use quotes,
+> # since $TMPDIR, and thus $file, may contain whitespace.
+> echo ... > "$file"
+> rm "$file"
> @}
@end example
@@ -12186,12 +12187,12 @@ time between generating the name and using it where another process
can create an object by the same name.
@item -p @var{dir}
-@itemx --tempdir[=@var{dir}]
+@itemx --tmpdir[=@var{dir}]
@opindex -p
-@opindex --tempdir
+@opindex --tmpdir
Treat @var{template} relative to the directory @var{dir}. If
@var{dir} is not specified (only possible with the long option
-@option{--tempdir}) or is the empty string, use the value of
+@option{--tmpdir}) or is the empty string, use the value of
@env{TMPDIR} if available, otherwise use @samp{/tmp}. If this is
specified, @var{template} must not be absolute. However,
@var{template} can still contain slashes, although intermediate