Complete the code to create a temporary file using mktemp.
tempfile=[1]The mktemp command creates a unique temporary file and returns its name.
Complete the code to create a temporary directory using mktemp.
tempdir=[1] -dThe mktemp -d command creates a unique temporary directory and returns its name.
Fix the error in the code to safely create a temporary file and write 'Hello' into it.
tempfile=[1] echo "Hello" > $tempfile
Using mktemp ensures a unique temporary file is created before writing to it.
Fill both blanks to create a temporary file with a custom prefix and then remove it.
tempfile=[1] -t [2] rm $tempfile
mktemp -t mytemp creates a temporary file with prefix 'mytemp'. Then rm removes it.
Fill all three blanks to create a temporary directory with a prefix, list its contents, and then remove it.
tempdir=[1] -d -t [2] ls [3] rm -r $tempdir
mktemp -d -t tempdir creates a temporary directory with prefix 'tempdir'. Then ls $tempdir lists its contents, and rm -r $tempdir removes it.