A backup script must generate a shell file containing multiple commands without relying on external source files. Which approach ensures the block of commands is embedded within the script and saved into backup.sh?
The correct answer places the redirection to backup.sh before the delimiter marker, using <<EOF to feed the following lines into cat and write them into the file. The other options misplace the filename or use the wrong redirection operator, so they do not embed the text block as intended.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the 'EOF' stand for and why is it used?
Open an interactive chat with Bash
What are some other methods to create or append scripts in Linux?
Open an interactive chat with Bash
Why is the order of redirection important in the given options?