Inspired by the 100 Days of Code challenge on Replit, I decided to delve into Bash scripting, noticing its similar syntax to Python. I found an excellent learning resource in the Microsoft Developer YouTube Playlist, which made the journey engaging and straightforward.
Running the Script
With newfound knowledge, I created a simple Bash script:

To run the script from anywhere, I made it executable and set the correct ownership:
sudo chmod +x /usr/local/bin/scripttest
sudo chown $USER:$USER /usr/local/bin/scripttest
Understanding the Script
- Shebang (
#!/bin/bash
): Specifies the Bash shell as the interpreter. - Variables: Stores and displays messages, current directory, and network details.
- Readonly Constant: Prevents modification of the
bye
variable. - Echo Statements: Outputs the messages and details.