My Experience on This Lab
In this lab, I created and ran Bash scripts using vim, added the shebang line, made each script executable, and tested them in the terminal. I wrote a script to check whether a number was greater than 10, another that identified whether an input was a file or directory and created a file if it didn’t exist, and an extra-credit script that validated directory names and displayed their contents.
Key Concepts I Learned
I practiced using conditional statements, reading user input, testing files and directories (-d, -f), using redirection, and setting execute permissions with chmod +x. This reinforced how shell scripts automate system tasks.
Challenges
The main challenge was ensuring each script handled all conditions properly, especially distinguishing files from directories. Testing different inputs helped confirm the logic.