Skip to content

mktemp

  • Outputs the path of the file/folder created
# Temporary file
temp_file=$(mktemp)

# Temporary directory
temp_dir=$(mktemp -d)