73.6k views
1 vote
The ____ command is useful when you want your shell program to automatically remove any temporary files that are created when the shell script runs.

User Rayabhik
by
6.6k points

1 Answer

5 votes

The trap command is useful when you want your shell program to automatically remove any temporary files that are created when the shell script runs. The trap command is a basic, but a very beneficial tool. If the script generates temporary files, like a simple script that changes FOO for BAR in entirely files in the existing directory, /tmp file will be clean when you exit the script.

User Shanice
by
7.1k points