Wiki source for CommandMktemp
=====Command mktemp=====
This command is part of the [[CommandsPosix posix]] extensions and needs to be imported to be available to the shell.
See [[CommandsPosix Posix Commands]]
====Name====
**mktemp** create a temporary file or directory
====Synopsis====
mktemp [options]
====Options====
||-d,-directory||Creates a directory instead of a file||
||-s,-suffix suffix||optional suffix used for temporary file||
||-tempdir directory||Uses directory instead of $TMP||
||-p,-prefix prefix||optional prefix used for temporary file||
====Description====
Creates a temporary file and outputs the full path name to stdout.
If -d is specified creates a directory instead of a file.
If -s is specified uses the supplied suffix otherwise no suffix is used.
If -p is specifies then prepends the supplied prefix otherwise "xmlsh" is used.
Note: an empty file is created not just a pathname. This is required to guarentee multiple calls to mktemp always return unique unused filenames.
====Return Value====
Returns 0 if the command executed successfully, 1 if there was an error.
----
[[Commands]]
[[CategoryCommands]]
[[CommandsPosix]]
This command is part of the [[CommandsPosix posix]] extensions and needs to be imported to be available to the shell.
See [[CommandsPosix Posix Commands]]
====Name====
**mktemp** create a temporary file or directory
====Synopsis====
mktemp [options]
====Options====
||-d,-directory||Creates a directory instead of a file||
||-s,-suffix suffix||optional suffix used for temporary file||
||-tempdir directory||Uses directory instead of $TMP||
||-p,-prefix prefix||optional prefix used for temporary file||
====Description====
Creates a temporary file and outputs the full path name to stdout.
If -d is specified creates a directory instead of a file.
If -s is specified uses the supplied suffix otherwise no suffix is used.
If -p is specifies then prepends the supplied prefix otherwise "xmlsh" is used.
Note: an empty file is created not just a pathname. This is required to guarentee multiple calls to mktemp always return unique unused filenames.
====Return Value====
Returns 0 if the command executed successfully, 1 if there was an error.
----
[[Commands]]
[[CategoryCommands]]
[[CommandsPosix]]