DevOps Zero to Job-Ready – Day 11/180 | Bash Variables & Script Structure After writing basic scripts earlier, today focuses on understanding how scripts are actually structured. What this covers: * Using variables in Bash * Storing values like names, paths, dates * Basic script structure with `#!/bin/bash` * Making scripts more readable and reusable Example: ```bash #!/bin/bash NAME="DevOps" DATE=$(date) echo "Hello $NAME" echo "Today is $DATE" ``` Key idea: Scripts should not be hardcoded. Using variables makes them flexible and reusable. This is important for: * Deployment scripts * Automation tasks * Config-driven workflows --- Sharing today’s notes. More structured DevOps content available on [www.engidock.com](https://www.engidock.com). --- #EngiDock #DevOps #Linux #SRE #LearningInPublic
Bash Variables & Script Structure in DevOps
More Relevant Posts
-
Devops Hands-on practice with KodeKloud Completed real world task ✨ Task: create a cron job for root user that runs every 5 minutes every day. ➡️ Install Cronie package "sudo yum install -y cronie" ➡️ start crond service "sudo systemctl start crond" ➡️ Check crond service status "systemctl status crond" ➡️ For adding crontab, open root user's crontab "sudo crontab -e" , add "*/5 * * * * /path of the script" and save the file ➡️ Verify the cron job added "sudo crontab -l" 💡 Cronie package contains "crond" daemon and "crontab" utility 👉 crond is the background daemon that runs continuously and checks the task list every minute to see if anything is scheduled to run and executes it. 👉 crontab (cron table) utility is a time-based job scheduler which serves two primary roles: ⌛Command: The crontab command allows users to create, edit, view, and delete their task schedules. ⌛ File: "crontab file" is a simple text file that stores the list of commands (cron jobs) and the specific times they should run. #Devops #Linux #DevopsEngineer #Learning #Kodekloud
To view or add a comment, sign in
-
If you haven't subscribed to EverythingDevOps as a DevOps Engineer, you're missing out. A newsletter just meant for you. I learned new Linux commands today I've never heard of. Did you know you can use a line of command to convert documents into different formats, instead of going through the website converters online? This is not a paid advertisment by the way. This is just me pointing you in the right direction. #EverythingDevOps #devops #IT #informationtechnology #software #tech #linkedin #linkedinvoices
To view or add a comment, sign in
-
One thing I’m learning recently: 👉 DevOps is not just about tools… it’s about automation. While going through Shell Scripting for DevOps, I saw how simple scripts can automate powerful tasks like: 🔹 Server setup and package installation 🔹 Monitoring system performance 🔹 Managing backups and logs 🔹 Automating deployments with tools like Docker, Jenkins, and Kubernetes. What really stood out to me? A few lines of Bash can: ✔ Restart failed services automatically ✔ Monitor CPU, memory, and disk usage ✔ Trigger CI/CD pipelines ✔ Deploy applications without manual intervention For example: 👉 A simple script can check if a service like NGINX is down and restart it instantly 👉 Another script can back up databases daily without human input This made me realize: 👉 The real power in DevOps is automation at scale. 💡 MY TAKEAWAY If you want to get into DevOps: 👉 Learn Linux 👉 Learn Shell scripting 👉 Learn how systems actually work Because: 🚫 Manual work doesn’t scale ✅ Automation does #DevOps #ShellScripting #Linux #Automation #CloudComputing #TechSkills #Engineering #SoftwareEngineering #STEM #CareerGrowth
To view or add a comment, sign in
-
𝐉𝐞𝐧𝐤𝐢𝐧𝐬 𝐂𝐈/𝐂𝐃 𝐏𝐢𝐩𝐞𝐥𝐢𝐧𝐞, 𝐒𝐢𝐦𝐩𝐥𝐞 & 𝐂𝐥𝐞𝐚𝐫 𝐔𝐧𝐝𝐞𝐫𝐬𝐭𝐚𝐧𝐝𝐢𝐧𝐠| A well-structured CI/CD pipeline is essential for delivering applications faster and more reliably. While working with Jenkins, I realized that a pipeline is not just automation—it’s a defined workflow that brings consistency to software delivery. The process starts with defining the pipeline and agent, where agent any allows execution on any available machine. The environment section helps manage variables like application settings across all stages. At the core are the stages, which handle the complete lifecycle of the application: 👉 Build → Compile and package the code 👉 Test → Validate functionality and quality 👉 Deploy → Release the application (often using Docker) After all stages are completed, the post section runs automatically to take care of important tasks like: 👉 Archiving artifacts 👉 Sending notifications 👉 Performing cleanup This structured approach helps teams deliver software more reliably and efficiently. #Kubernetes #Helm #DevOps #CloudNative #Containers #Pod #YAML #Kubernetes #ZeroToOne #Git #GitHub #Linux #VersionControl #Linux #CICD #Docker #Terraform #Script #AWS #GCP #Azure #SDLC #DevOpsLife #SRE #DevOpsEngineer #jenkins #devops #cicd #automation
To view or add a comment, sign in
-
-
Is Jenkins still relevant in 2026? Absolutely. 🚀 Despite the rise of cloud-native CI/CD tools, Jenkins remains a powerhouse for enterprise DevOps. Its unmatched flexibility, massive plugin ecosystem, and robust master-agent architecture make it ideal for complex, hybrid environments. Key advantages: ✅ Pipeline as Code:Version-controlled, reproducible builds via Jenkinsfile. ✅ Scalability:Dynamic agents on Kubernetes ensure efficient resource usage. ✅ Community:Decades of support mean solutions for almost every issue. While it requires maintenance, Jenkins offers control that managed services often lack. It’s not just a legacy tool; it’s a versatile engine for serious automation. Are you sticking with Jenkins or migrating to GitHub Actions/GitLab? Let’s discuss your strategy below! 👇 #DevOps #Jenkins #CICD #Automation #SoftwareEngineering #TechTrends #CloudComputing
DevOps Engineer | AWS | Azure Cloud | GCP | Kubernetes | CI/CD | Docker | Terraform | 3X Google Cloud Certified | 4X Azure Cloud Certified | 1X AWS Certified.
𝐉𝐞𝐧𝐤𝐢𝐧𝐬 𝐂𝐈/𝐂𝐃 𝐏𝐢𝐩𝐞𝐥𝐢𝐧𝐞, 𝐒𝐢𝐦𝐩𝐥𝐞 & 𝐂𝐥𝐞𝐚𝐫 𝐔𝐧𝐝𝐞𝐫𝐬𝐭𝐚𝐧𝐝𝐢𝐧𝐠| A well-structured CI/CD pipeline is essential for delivering applications faster and more reliably. While working with Jenkins, I realized that a pipeline is not just automation—it’s a defined workflow that brings consistency to software delivery. The process starts with defining the pipeline and agent, where agent any allows execution on any available machine. The environment section helps manage variables like application settings across all stages. At the core are the stages, which handle the complete lifecycle of the application: 👉 Build → Compile and package the code 👉 Test → Validate functionality and quality 👉 Deploy → Release the application (often using Docker) After all stages are completed, the post section runs automatically to take care of important tasks like: 👉 Archiving artifacts 👉 Sending notifications 👉 Performing cleanup This structured approach helps teams deliver software more reliably and efficiently. #Kubernetes #Helm #DevOps #CloudNative #Containers #Pod #YAML #Kubernetes #ZeroToOne #Git #GitHub #Linux #VersionControl #Linux #CICD #Docker #Terraform #Script #AWS #GCP #Azure #SDLC #DevOpsLife #SRE #DevOpsEngineer #jenkins #devops #cicd #automation
To view or add a comment, sign in
-
-
Exploring Jenkins in My DevOps Journey ≈======================================= As I continue building my skills in DevOps, I’ve been diving deep into Jenkins — one of the most powerful automation servers used for Continuous Integration and Continuous Delivery (CI/CD). Here’s what I’ve been working on: - Installing and configuring Jenkins on a Linux server - Setting up jobs to pull code from GitHub repositories - Automating builds using JDK 11 - Understanding pipelines and job configurations - Troubleshooting common issues in CI/CD workflows What I’ve learned so far: Jenkins helps eliminate manual processes, improves code quality, and speeds up deployment by automating the entire software delivery pipeline. Still learning, still building… Next, I’m focusing on integrating Jenkins with Docker and exploring pipeline as code using Jenkinsfile. If you’re also learning DevOps or working with Jenkins, I’d love to connect and share ideas! #DevOps #Jenkins #CICD #Automation #Linux #GitHub #CloudComputing #LearningJourney
To view or add a comment, sign in
-
-
DevOps Zero to Job-Ready – Day 4/180 | Linux Text Processing Today I focused on something that’s actually used a lot in real DevOps work — text processing. What I explored: Searching logs using grep Case-insensitive search (-i) Finding exact lines (-n) Using pipes (|) to combine commands What I realized: In real environments, logs can be huge. You can’t manually scroll and find issues. You need to search smartly. Debugging failed deployments Investigating production issues Sharing today’s notes as well for anyone learning along. I’m also organizing all structured notes, real-world scenarios, and project-based learning content on www.engidock.com — useful if you want a more guided DevOps learning path. Next: Bash scripting basics Trying to stay consistent with this series — one step at a time. #EngiDock #DevOps #Linux #LearningInPublic #Debugging
To view or add a comment, sign in
-
🚀 Setting Up Jenkins for CI/CD Pipelines | Day 68/100 – DevOps Journey Today’s task was about setting up a CI/CD server using Jenkins, a core tool in modern DevOps workflows. 🔹 What I did: - Installed Jenkins using apt on the server - Started and verified Jenkins service - Debugged service issues using logs (/var/log/jenkins/jenkins.log) - Completed initial setup via Jenkins UI - Created admin user: ⚙️ Why it matters: - Jenkins is widely used to automate: Build → Test → Deploy pipelines - Reduces manual work and improves delivery speed - Backbone of modern CI/CD systems This marks a step forward into automation and pipeline engineering in DevOps 🚀 Proof of work :- https://lnkd.in/gnBnU_cv #100DaysOfDevOps #DevOps #Jenkins #CICD #Automation #CloudNative #Linux #LearningInPublic #TechCareers #OpenToWork
To view or add a comment, sign in
-
-
Ever wondered what really powers most of the automation behind the scenes in Linux systems? 👀 Welcome to the world of Shell Scripting — simple, powerful, and a must-have skill for anyone in DevOps, System Admin, or Application Support. 💡 What is Shell Scripting? It’s basically writing a series of commands in a file that the shell can execute automatically — saving time, reducing errors, and making your life easier. 🔹 Basic Building Blocks: ✅ Shebang (#!) Tells the system which interpreter to use Example: "#!/bin/bash" ✅ Variables Store values for reuse "name="Sumit"" "echo $name" ✅ User Input "read user_input" ✅ Conditional Statements (if-else) Make decisions in scripts if [ $num -gt 10 ]; then echo "Greater than 10" fi ✅ Loops (for/while) Repeat tasks efficiently for i in {1..5} do echo $i done ✅ Functions Reusable blocks of code greet() { echo "Hello $1" } greet Sumit ⚙️ Real-Life Use Cases: - Automating backups 📦 - Monitoring server health 🖥️ - Log cleanup & rotation 🧹 - Deployment scripts 🚀 - Cron jobs for scheduled tasks ⏰ 🔥 Why should you learn it? Because in real production environments, automation isn’t optional — it’s survival. Start small. Automate one repetitive task daily. That’s how pros are built. #Linux #ShellScripting #DevOps #Automation #SRE #Learning #TechCareers
To view or add a comment, sign in
-
Day 06 of #90DaysOfDevOps 🚀 Linux File I/O: A Core DevOps Skill Today I revisited the basics — this time thinking like an operator, not a student. Reading and writing files is part of daily DevOps work: → Tailing logs during an incident at 2 AM → Updating configs in deployments → Capturing script output for debugging → Managing YAML, Dockerfiles, and shell scripts What I practiced today: ✅ `echo "..." > file.txt` — overwrite with intention (one wrong `>` can wipe a config file) ✅ `echo "..." >> file.txt` — safe append for logs and configs ✅ `echo "..." | tee -a file.txt` — write AND display simultaneously ✅ `cat`, `head`, `tail` — inspect file contents at different granularities 💡 Command I'll use often: `tee` Perfect for scripts where output needs to be both visible and logged at the same time. 🔑 Key Insight: Every config, log, Dockerfile, and manifest is just text. Engineers who handle text efficiently troubleshoot faster and ship faster. #90DaysOfDevOps #DevOpsKaJosh #TrainWithShubham #Linux #DevOps
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development