Recall & Review
beginner
What is a shell script?
A shell script is a text file that contains a series of commands for the shell to execute. It helps automate tasks on your computer.
Click to reveal answer
beginner
Why use a shell script instead of typing commands one by one?
Shell scripts save time by running many commands automatically. They reduce mistakes and make repeating tasks easy.
Click to reveal answer
beginner
What does the first line '#!/bin/bash' mean in a shell script?
It tells the computer to use the Bash shell to run the script. This line is called a shebang.
Click to reveal answer
beginner
How do you run a shell script?
You make the script file executable and then run it by typing its path, like './script.sh'.
Click to reveal answer
beginner
Can a shell script interact with the user?
Yes, shell scripts can ask for input and show messages, making them interactive.
Click to reveal answer
What is the main purpose of a shell script?
✗ Incorrect
Shell scripts automate commands so you don't have to type them one by one.
What does the '#!/bin/bash' line do in a shell script?
✗ Incorrect
This line tells the system to use Bash to run the script.
How do you make a shell script executable?
✗ Incorrect
The 'chmod +x' command gives permission to run the script.
Which file extension is commonly used for shell scripts?
✗ Incorrect
Shell scripts usually have the '.sh' extension.
Can shell scripts ask the user for input?
✗ Incorrect
Shell scripts can use commands like 'read' to get input from users.
Explain what a shell script is and why it is useful.
Think about how repeating tasks can be done faster.
You got /5 concepts.
Describe the steps to create and run a simple shell script.
Remember the commands to give permission and how to start the script.
You got /4 concepts.