linux bash temporary file

C++
temp_file=$(mktemp)
# do something with the file
rm ${temp_file}
Source

Also in C++: