๐ Day 8 of #90DaysOfDevOps: Bash Scripting Basics ๐ฅ๏ธ
Today, I explored the essentials of bash scripting, covering key concepts step by step. Here's how I tackled each task, along with command-line examples:
๐ Task 1: Comments
What I Learned: Comments in bash scripts start with # and are used to explain what different parts of the script do.
Example:
๐ฃ Task 2: Echo
What I Learned: The echo command displays messages in the terminal. Itโs a simple way to print text or variable values.
Example:
๐ผ Task 3: Variables
What I Learned: Variables in bash can store data that can be referenced by their name.
Example:
โ Task 4: Using Variables
What I Learned: Variables can be used to perform operations like arithmetic.
Example:
๐ Task 5: Built-in Variables
What I Learned: Bash has built-in variables that hold useful information, such as the script name ($0), the number of arguments ($#), and more.
Example:
โจ Task 6: Wildcards
What I Learned: Wildcards (*, ?, [ ]) are used to perform pattern matching for file operations.
Example:
# List all files with a .txt extension in the current directory
# List all files starting with 'file' and ending in '.sh'
Day 8 was an exciting introduction to bash scripting, building a solid foundation for more complex tasks ahead. Canโt wait to dive into advanced concepts in the coming days! ๐
#Day8 #BashScripting #DevOpsLife #LinuxLearning #Automation #ShellScripting #90DaysOfDevOps #TechGrowth #CommandLine
Subscribe to my newsletter
Read articles from Naushad Khan directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Naushad Khan
Naushad Khan
DevOps engineer with a passion for automation, CI/CD, and cloud platforms like AWS. I bridge dev and ops, optimizing workflows and sharing insights through technical blogs. Letโs automate the future! ๐โ๏ธ