Mktemp: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 6: Line 6:


Create a temporary file or directory and display its name at stdout.
Create a temporary file or directory and display its name at stdout.
<syntaxhighlight lang='bash'>
local f=$(mktemp)
</syntaxhighlight>
creates a /var/folders/t3/mmn20npx7fs31lwlp2s4_6wm0000gq/T/tmp.hbvowAQL file on Mac.


=Options=
=Options=

Revision as of 02:26, 21 January 2021

Internal

Overview

Create a temporary file or directory and display its name at stdout.

local f=$(mktemp)

creates a /var/folders/t3/mmn20npx7fs31lwlp2s4_6wm0000gq/T/tmp.hbvowAQL file on Mac.

Options

-d

mktemp -d

Create a temporary directory.