Day 11 of My DevOps Journey 🚀 Today I learned about Variables in Shell Scripting 🧠💻 🔹 What I learned: ✔️ Variables are used to store values (key-value format) ✔️ No data types in shell scripting ✔️ System variables → SHELL, USER, PATH ✔️ User-defined variables for custom use 🔹 Hands-on: ✔️ Created variables using export ✔️ Accessed values using echo ✔️ Removed variables using unset 🔹 Important Concepts: ✔️ Temporary vs Permanent variables ✔️ Used .bashrc to store variables permanently ✔️ Learned how to set variables for all users 🔹 Rules: ✔️ No numbers at the start ✔️ Avoid special characters (-, @, #) ✔️ Prefer uppercase variable names Learning step by step and building consistency 💪🔥 #DevOps #Linux #ShellScripting #AWS #LearningJourney
Variables in Shell Scripting: Key Concepts and Best Practices
More Relevant Posts
-
💻 Day 9 + 10 – Advanced Shell Scripting 🚀 Continuing my DevOps learning journey, these two days were all about writing smarter shell scripts and automating node health checks. I explored how to: 🔸Build a Node Health Script using shebang, metadata, and debug mode (set -x) 🔸Use df, free, nproc, and top to monitor disk, memory, and CPU 🔸Filter and extract process IDs with ps -ef | grep | awk 🔸Combine echo statements and debug mode for better readability 🔸Apply these techniques to real DevOps troubleshooting on EC2 instances Each command now feels like a building block toward automation and efficiency — the essence of DevOps. 📸 Attaching my visual summary below to make these concepts easier to grasp! Also do check out my GitHub repo 👉 https://lnkd.in/de9WeNVY #DevOps #ShellScripting #AWS #Automation #LearningJourney #GitHub #Linux #CloudEngineering #Debugging #ProcessManagement
To view or add a comment, sign in
-
-
A common 𝗗𝗲𝘃𝗢𝗽𝘀 𝗺𝗶𝘀𝘁𝗮𝗸𝗲 trying to jump straight to advanced tools like Terraform, AI, and automation without building the 𝗳𝘂𝗻𝗱𝗮𝗺𝗲𝗻𝘁𝗮𝗹𝘀 𝗳𝗶𝗿𝘀𝘁. In reality, 𝘀𝘁𝗿𝗼𝗻𝗴 𝗗𝗲𝘃𝗢𝗽𝘀 𝗲𝗻𝗴𝗶𝗻𝗲𝗲𝗿𝘀 are built on solid understanding of Linux, networking, scripting, and CI/CD. Skipping these layers 𝗺𝗶𝗴𝗵𝘁 𝗳𝗲𝗲𝗹 𝗳𝗮𝘀𝘁, but it usually leads to fragile systems and painful debugging later. 𝗖𝗼𝗻𝗰𝗹𝘂𝘀𝗶𝗼𝗻: There are no real shortcuts in DevOps—master the basics, and the advanced tools will actually make sense (and work reliably). #DevOps #CloudComputing #Kubernetes #Docker #Terraform #Linux #Scripting #CICD #TechMeme #ProgrammerLife #ITLife #LearningJourney #BuildInPublic #CareerGrowth #DevOpsLife #DevOpsEngineer #CloudNative #AWS #Azure #GCP #InfrastructureAsCode #Automation #PlatformEngineering #SiteReliability #SRE #Observability #Monitoring #GitOps #ContinuousIntegration #ContinuousDelivery #Microservices #Containers #K8s #Helm #Ansible #Jenkins #GitHubActions #Bash #PythonDev #LinuxAdmin #SysAdmin #TechCareer #SoftwareEngineering #CodeLife #Debugging #ProductionIssues #ITMemes #ProgrammerHumor #EngineeringLife #LearnToCode #Upskill #CareerInTech #RealWorldSkills #EyesOnCloud #NaushadNazeerPasha #DockerNaushad #KubernetesNaushad #TechnicalTrainerNaushadNazeerPasha
To view or add a comment, sign in
-
-
🚀 Terraform Variables: Complete Guide If you're working with Infrastructure as Code, mastering Terraform variables is a must! Here's everything you need to know in one infographic 👇 🔷 8 Variable Types: string number bool list(string) map(string) tuple object set(string) 🔷 3 Ways to Assign Values: ✅ .tfvars file ✅ TF_VAR_ environment variable ✅ -var CLI flag 🔷 Precedence Order (most misunderstood!): Default value → .tfvars → TF_VAR_ → -var CLI flag ⚠️ CLI flag always wins! 💡 Understanding precedence saves you hours of debugging in real projects. Save this post for your next Terraform project! 🔖 #IaC #InfrastructureAsCode #AWS #Azure #GCP #CloudComputing #DevOps #DevSecOps #SRE #PlatformEngineering #CloudNative #CloudArchitecture #TechLearning #LearnDevOps #DevOpsEngineer #CloudEngineer #100DaysOfCloud #Automation #Linux #OpenSource #Programming #Coding #SoftwareEngineering #TechCommunity #Technology #Innovation
To view or add a comment, sign in
-
-
Ever felt like your shell scripts are working… but still not smart enough? They run commands. They finish fast. But they don’t wait, don’t retry, and don’t handle user choices cleanly. That’s where this chapter comes in. 👉 This is Part 3 of the Shell Scripting series. If you haven’t seen the earlier parts, start here: 🔗 Part 1 (Basics): [ https://lnkd.in/g2ZBhqar ] 🔗 Part 2 (Conditionals & Loops): [ https://lnkd.in/gfUUjMzH ] In this blog, I’ve focused on three powerful concepts that make your scripts more practical: 👉 while loops – keep running until a condition changes 👉 break & continue – control how loops behave 👉 case statements – clean and readable decision-making Here’s what you’ll learn: 1) How to make your script wait until something is ready (instead of checking just once) 2) Why sleep is important when retrying or polling 3) How to stop loops (break) or skip steps (continue) 4) How to build interactive menus using loops 5) Why case is much cleaner than long if/elif blocks Simple idea: If you don’t know how many times something should run → use while If you have too many conditions → use case That’s when scripting starts to feel like building real systems. Read the full blog/Attached doc here: [ https://lnkd.in/gWS86uqk ] What should I write about next? Feel free to comment below & I’ll try to create a post on your suggestion within a day. I can cover topics like: Git, Ansible, Jenkins, Groovy, Terraform, AWS, Networking, Linux, DevOps practices, Cloud architecture, CI/CD pipelines, Infrastructure as Code, or anything related. If you find the content useful, please share it with your network and drop a like 👍 it really helps these posts reach more Linux, DevOps, and Cloud folks. Your likes and shares are what keep me motivated to keep writing consistently. Thanks in advance for your ideas and support! #Linux #ShellScripting #Bash #DevOps #Automation #Scripting #LinuxBasics
To view or add a comment, sign in
-
Day 19 of #90DaysOfDevOps - Log Rotation, Backup & Crontab Today I worked on a real-world Shell Scripting project where I built automation scripts 🔧 What I built: • Log Rotation Script – compress old logs & clean up storage • Backup Script – create timestamped backups automatically • Crontab Setup – schedule jobs like a real server • Maintenance Script – combined everything into one automation ⏰ Automated tasks: • Log rotation → daily at 2 AM • Backup → every Sunday at 3 AM • Health check → every 5 minutes • Full maintenance → daily at 1 AM Checkout my work: https://lnkd.in/gJkC8_5Z #90DaysOfDevOps #DevOps #Linux #ShellScripting #Automation #Cloud #AWS #LearningInPublic #BuildInPublic #DevOpsJourney #Programming #Coding #Tech #CareerGrowth #Consistency #DevOpsKaJosh #TrainWithShubham
To view or add a comment, sign in
-
🚀 Kubernetes Hands-on: Labels, Selectors & Pod Debugging In this task, I worked on implementing Kubernetes Labels & Selectors and explored how they are used to organize and manage workloads effectively in a cluster. 🔧 What I did: ✔Created multiple Pods with meaningful labels (app, environment, tier) ✔Used selectors to filter and group resources ✔Practiced advanced selectors (in, notin, exists) ✔Dynamically updated labels using kubectl commands ✔Debugged a crashing PostgreSQL pod using logs and describe Issue Faced: The database pod went into CrashLoopBackOff due to a missing environment variable (POSTGRES_PASSWORD). Solution: Identified the issue using kubectl logs Fixed it by adding required environment variables Re-deployed and verified successful execution Why this matters: Labels & Selectors are fundamental in Kubernetes for: ✔Service routing & load balancing ✔Deployment management ✔Environment separation (dev/staging/prod) Real DevOps is not just deployment — it's about debugging, understanding failures, and fixing them efficiently. #Kubernetes #DevOps #LearningByDoing #CloudComputing #K8s #Debugging #Containers #Linux #DevOpsJourney
To view or add a comment, sign in
-
💡 Most people learn DevOps… I decided to build one from scratch. So I created my own self-hosted homelab infrastructure 🏠⚙️ --- 🚀 What’s inside? - 🐧 Ubuntu Server - ⚙️ Kubernetes (k3s) for orchestration - 🌐 Nginx as reverse proxy - 📺 Jellyfin (media server) - ☁️ Nextcloud (self-hosted storage) - 🤖 CI/CD using webhooks + bash scripts - 🧠 Custom Python tool to automate media ingestion --- 📊 The architecture (attached below) shows how everything connects — from networking → compute → storage → automation. --- 🔥 What I learned: - Real DevOps is not just tools — it’s how systems interact - Debugging > Tutorials (mount failures, permissions, streaming issues 😅) - Automation makes everything 10x smoother --- 🔗 Project Repo: https://lnkd.in/gZ9G9peh --- Would love to hear your thoughts or suggestions to improve this setup 👇 #DevOps #Kubernetes #Homelab #Linux #Automation #SelfHosted #SRE #Backend
To view or add a comment, sign in
-
-
"It works on my machine" is still one of the most dangerous sentences in software. Because working locally is not the real finish line, production is. A feature may look fine in development and still fail after deployment because of environment differences, bad configuration, missing monitoring, weak rollout process, or simply because nobody checked how it behaves outside a laptop. That is why I like the mindset of "you build it, you run it." For me, writing the code is only part of the work. The job also includes thinking about the container, the pipeline, the deployment flow, the logs, the metrics, and what the team will do if something breaks at 2 a.m. Docker, CI/CD, Kubernetes, cloud infrastructure, Linux, Grafana, dashboards, alerts — none of that is "extra." That is part of delivering software in a serious way. Observability is also a big part of this. A service is not healthy just because it is up. You need to see what is happening, understand the signals, and react before small issues become production incidents. Good engineering is not only about making something run. It is about making it run reliably in the real world. #Java #SoftwareEngineer #DevOps #Grafana #CICD #Docker #Kubernetes #AWS #Observability #Linux #Git
To view or add a comment, sign in
-
-
🚀 From 1.5 GB → 50 MB Docker Image (95% Reduction) 🐳 I recently reduced my Docker image size from 1.5 GB to just 50 MB — that’s a 95% improvement. And honestly? This wasn’t about advanced tricks… it was about doing the basics consistently. ⚠️ Why this matters: Oversized images = ❌ Slower deployments ❌ Higher storage costs ❌ Bigger attack surface 👉 Lean containers aren’t optional in DevOps — they’re a discipline. 🔧 7 Practices I Follow in Every Build: 1️⃣ Use minimal base images Alpine or slim variants cut hundreds of MB instantly. 2️⃣ Multi-stage builds = must-have Build tools stay in one stage, final image stays clean. 3️⃣ Install only what’s needed Every extra package = unnecessary risk + size. 4️⃣ Clean cache in the SAME layer Otherwise, Docker still keeps the junk. 5️⃣ Chain RUN commands Fewer layers = smaller images. 6️⃣ Use a .dockerignore file Keep out node_modules, .git, logs, env files. 7️⃣ Never run as root Simple step → big security win. #Docker #DevOps #CloudEngineering #AWS #Containers #Linux #DevOpsJourney #90DaysOfDevOps
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