It is common to make a unique temporary file. How to make a unique temporary file in Bash on Linux safely and quickly?
You can use the
In the simplest way,
The file will be like
/tmp/tmp.j0wD39Mr3b if you do not prefer any meaningful names.
You can set the file to your preferred string like
myapp.<6 char random string> by
tmpfile=$(mktemp -t myapp.XXXXXX)
Your temporary file will be like
You may also choose the directory where the temporary file is in by setting the
Check more about
mktemp man page.