1. Shebang
#!/bin/bashIndicates the script should run in Bash.
2. Variables
name="Alice"Declares a variable.
3. Echo
echo "Hello $name"Prints output to the terminal.
4. Read
read usernameTakes user input and stores in variable.
5. If Statement
if [ $x -eq 1 ]; then echo "One"; fiConditional logic in Bash.
6. For Loop
for i in 1 2 3; do echo $i; doneLoops through a list of values.
7. While Loop
while [ $x -lt 5 ]; do echo $x; x=$((x+1)); doneRepeats as long as condition is true.
8. Functions
greet() { echo "Hi $1"; }Defines a reusable block of code.
9. Case Statement
case $var in 1) echo One;; esacPattern matching like switch-case.
10. Exit Status
echo $?Checks result of last command.
11. Comments
# This is a commentUsed to document code.
12. Command Substitution
today=$(date)Captures command output into a variable.
13. Test Command
test -f file.txtChecks file types or conditions.
14. Quotes
echo "