how to write to a temp file from linux script code example Example: linux bash temporary file temp_file=$(mktemp) # do something with the file rm ${temp_file}