well answered graded A+ 2025/2026
For a shell script intended to be run by the Bash shell, what should you start the script with? -
ANS ✔✔#!/bin/bash
How do you add execute permissions to a file? - ANS ✔✔chmod +x <filename>
In a situation where you are launching multiple commands in a script, what can you add to the
end of each command to allow the next command to run before the first finishes? - ANS ✔✔&
This utility provides text editor capabilities via commands that can be typed in a command
prompt. - ANS ✔✔sed
You've written a script that accepts 2 arguments. In the script, what variables are these
arguments assigned to? - ANS ✔✔$1 and $2
When accessing a variable in a shell script, how should you type the variable name? - ANS
✔✔With a $ at the beginning of it.
$variableName
When assigning a value to a variable in a shell script, how should you type the variable name? -
ANS ✔✔Just the variable name. When assigning, you don't need to put a $ in front of it.
What variable holds the exit status of the most recently executed command? - ANS ✔✔$?