Subject: Re: mktemp(1) synopsis; calling it without arguments
To: Alan Barrett <apb@cequrux.com>
From: Tilman Kranz <tilman.kranz@tk-sls.de>
List: tech-userlevel
Date: 09/17/2006 11:37:33
This is a multi-part message in MIME format.
--------------030504030809010904080807
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Alan Barrett schrieb:
> On Sun, 17 Sep 2006, Tilman Kranz wrote:
>> The synopsis section is modified to
>>
>> mktemp [-d] [-q] [-u] [-t prefix | template ...]
> I think that should use curly braces to indicate a non-optional
> choice:
> mktemp [-d] [-q] [-u] {-t prefix | template ...}
For convenience I regenerated the patch adopting this change and
attached it.
--------------030504030809010904080807
Content-Type: text/x-patch;
name="mktemp.1.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="mktemp.1.diff"
--- mktemp.1 2006-06-19 06:17:07.000000000 +0200
+++ mktemp.1.new 2006-09-17 11:19:54.000000000 +0200
@@ -41,9 +41,12 @@
.Nm mktemp
.Op Fl d
.Op Fl q
-.Op Fl t Ar prefix
.Op Fl u
-.Op Ar template ...
+.Bro
+.Fl t Ar Prefix
+.No |
+.Ar template ...
+.Brc
.Sh DESCRIPTION
The
.Nm
@@ -109,10 +112,18 @@
be taken to ensure that it is appropriate to use an environment variable
potentially supplied by the user.
.Pp
-Any number of temporary files may be created in a single invocation,
-including one based on the internal template resulting from the
+Any number of temporary files may be created in a single invocation
+using multiple
+.Ar template
+arguments, also a single one based on the internal template with the
+.Fl t
+option value as filename prefix.
+.Pp
+At least one
+.Ar template
+argument or the
.Fl t
-flag.
+option must be present.
.Pp
.Nm
is provided to allow shell scripts to safely use temporary files.
@@ -131,7 +142,7 @@
.Nm
be used instead.
.Sh OPTIONS
-The available options are as follows:
+All options must preceed all non-options. The available options are as follows:
.Bl -tag -width indent
.It Fl d
Make a directory instead of a file.
@@ -144,7 +155,14 @@
.Ar prefix
and
.Ev TMPDIR
-if set) to create a filename template.
+if set) to create a filename template. If
+.Fl t Ar prefix
+and
+.Ar template
+are both given,
+.Ar prefix
+will not apply to
+.Ar template.
.It Fl u
Operate in
.Dq unsafe
--------------030504030809010904080807--