plik temp bash
## You can use 'mktemp'
## Storing filename in a variable
## The X is replaced by random string
tmpfile=$(mktemp /tmp/abc-script.XXXXXX)
Tiago F2
## You can use 'mktemp'
## Storing filename in a variable
## The X is replaced by random string
tmpfile=$(mktemp /tmp/abc-script.XXXXXX)
temp_file=$(mktemp)
# do something with the file
rm ${temp_file}
--suffix=SUFF
append SUFF to TEMPLATE. SUFF must not contain slash. This option is implied if TEMPLATE does not end in X.
$ mktemp /tmp/banana.XXXXXXXXXXXXXXXXXXXXXXX.mp3
/tmp/banana.gZHvMJfDHc2CTilINNuq2P0.mp3