Package: mktemp Version: 1.5-8 Severity: wishlist Tags: patch Here is a patch to add an example of how to use the -d flag. It seems like this should be obvious, but it would have helped me as I skipped right over the flags and read the examples first. :)
Thanks, -- Matt Taggart [EMAIL PROTECTED]
--- mktemp.man.orig 2008-08-14 21:20:38.000000000 -0700 +++ mktemp.man 2008-08-14 21:25:16.000000000 -0700 @@ -181,6 +181,17 @@ .fi .RE +To create a temporary directory instead of a file, use the +.B \-d +flag. +.RS +.nf + +TMPDIR=`mktemp -d` || exit 1 +echo "program output" >> $TMPDIR/output + +.fi +.RE In some cases, it may be desirable to use a default temporary directory other than .I /tmp. --- mktemp.mdoc.orig 2008-08-14 21:20:50.000000000 -0700 +++ mktemp.mdoc 2008-08-14 21:28:43.000000000 -0700 @@ -191,6 +191,14 @@ echo "program output" >> $TMPFILE .Ed .Pp +To create a temporary directory instead of a file, use the +.Fl d +flag. +.Bd -literal -offset indent +TMPDIR=`mktemp -d` || exit 1 +echo "program output" >> $TMPDIR/output +.Ed +.Pp In some cases, it may be desirable to use a default temporary directory other than .Pa /tmp .