🚀 Day 18 – Shell Scripting Level Up! Today I focused on writing cleaner, safer, and reusable shell scripts — a big step from basic scripting to real-world usage 💻 What I learned: ✔️ Writing and calling functions for reusable code ✔️ Using set -euo pipefail for safer scripts ✔️ Handling return values & local variables ✔️ Building a complete system info script One important takeaway: Using set -euo pipefail makes your scripts more reliable and production-ready by preventing silent failures. Key Learnings: Functions = Cleaner & reusable code Strict mode = Safer & error-free scripts Check out my work:https://lnkd.in/g4TvriXU #90DaysOfDevOps #DevOpsKaJosh #TrainWithShubham #DevOps #ShellScripting #Linux #Automation #Scripting #LearningInPublic #TechJourney #Cloud #Programming #CareerGrowth #ITJobs #Developers #CodeNewbie
Shell Scripting Level Up: Cleaner, Safer Scripts with Functions & Strict Mode
More Relevant Posts
-
📜Learning bash scripting taught me something I didn't expect: The gap between understanding something and using something is massive. You can read about variables and functions all day. But the real progress happens when you: → Apply the theory in isolation (write the function, test it, break it) → Connect the concepts (pass parameters, capture input, handle logic) → Build something end-to-end (a real script that solves a real problem) 👇Below is a script I put together that sorts all .txt files in a directory by size, smallest to largest, with input validation built in. Is it the most efficient script? Probably not. But that's the point, efficiency comes with practice, and you can't refine what you haven't built yet! Most people stop at step one and wonder why it's not sticking. Build something, even something small. That's where it lands. What's a skill you learned by just building with it? 💻 #Bash #Scripting #Linux #Tech #DevOps
To view or add a comment, sign in
-
-
⚡ Day 16 – Shell Scripting Fundamentals in DevOps Today’s focus was on making my scripts more interactive and reliable. I worked through: 🔹 User input with read — capturing numbers, strings, and service names directly from the terminal. 🔹 Conditional logic (if-else) — comparing numbers, checking strings, and handling multiple cases with elif. 🔹 File checks (-f) — writing a script that asks for a filename and confirms if it exists. 🔹 Service checks (systemctl) — building a script that asks for a service name and reports if it’s active or not. 🔹 Troubleshooting syntax errors — learning why spaces around [ ] and using the right operators (= for strings, -eq for numbers) are critical in Bash. 💡 Key takeaway: Shell scripting is unforgiving about syntax, but that’s what makes it powerful. Every space, operator, and quote matters — and mastering these details builds the foundation for automation in DevOps. #90DaysOfDevOps #Day15 #DevOpsKaJosh #TrainWithShubham #Linux #ShellScripting #LearnInPublic
To view or add a comment, sign in
-
-
🚀 Most Used Linux Commands Every Developer Should Know If you’re working in backend, DevOps, or AI… Linux isn’t optional. It’s your daily toolkit. Here’s a quick breakdown of the commands that actually matter 👇 📂 File Handling Navigate and manage files like a pro → ls, cd, pwd, mkdir, rm 📖 File Viewing Read logs and files efficiently → cat, less, head, tail 🔍 Text Processing (Game Changer) Find and manipulate data fast → grep, awk, sort, find ⚙️ Process Management Control running applications → ps, top, kill, pkill 🌐 Networking Debug APIs & connect to servers → curl, ping, ssh, scp 💾 System Monitoring Know what’s happening inside your machine → df, du, free, uname 📦 Package Management Install tools in seconds → apt, dnf, yum 🔐 Permissions Control access and security → chmod, chown 🧰 Pro Tip: Don’t try to memorize everything. Think in actions: ◾ Search → grep ◾ Navigate → cd ◾ Debug → top Master these, and you can handle 90% of real-world tasks in Linux. 🔥 Reality check: 90% of dev work = just ~10 commands used daily. 💬 Which Linux command do you use the most? 🎯 Follow Virat Radadiya 🟢 for more..... #Linux #DevOps #BackendDevelopment #SoftwareEngineering #Programming #Developers #Coding #CloudComputing #TechSkills #LearnToCode
To view or add a comment, sign in
-
-
🚀 Day 20 – Log Analyzer and Report Generator Today I built a Log Analyzer & Report Generator using Bash scripting 💻 🔍 What it does: ✔️ Validates input log file ✔️ Counts total ERROR / Failed logs ✔️ Extracts CRITICAL events with line numbers ✔️ Finds Top 5 most frequent errors ✔️ Generates a clean summary report 📄 ✔️ Archives processed logs automatically 💡 Key Learning: Logs are gold in DevOps — analyzing them properly helps detect issues early and improves system reliability. Checkout my code: https://lnkd.in/g7FsuDiz #DevOps #BashScripting #Linux #Automation #LogAnalysis #Scripting #LearningInPublic #100DaysOfCode #TechJourney #CloudComputing #SystemAdmin #DevOpsEngineer #90DaysOfDevOps #DevOpsKaJosh #TrainWithShubham
To view or add a comment, sign in
-
I broke my laptop's Python environment 3 times in one month. Different projects needed different versions. One pip install would quietly destroy another project. Then I learned Docker — and everything changed. Here's what Docker actually does (no jargon): → It wraps your app + its dependencies into a box called a container → That box runs the same on your laptop, your teammate's Mac, and a Linux server → You stop saying "it works on my machine" — because it works everywhere My first Dockerfile was 5 lines: ``` FROM python:3.11 WORKDIR /app COPY . . RUN pip install -r requirements.txt CMD ["python", "app.py"] ``` That's it. No more environment disasters. I'm a CS student learning DevOps in public — this was my week 1 win. Have you had your environment broken by dependency conflicts? How did you fix it? #Docker #DevOps #LearnInPublic #CS #BackendDev
To view or add a comment, sign in
-
-
At some point, running commands stops being enough. You start asking: why am I doing this more than once? I’ve completed the Introduction to Shell Scripting Basics certification from CodeSignal as part of the Mastering Shell Scripting with Bash path. This stage marked a shift from simple execution to structured control—moving from typing commands to building logic that can make decisions and act independently. I worked through variable manipulation, including string handling and arithmetic expansion $((...)), while also navigating Bash’s strict whitespace rules that demand precision. I implemented conditional logic using if-elif-else structures with both numeric and string operators, built and iterated through arrays using different loop strategies, and created reusable functions using positional parameters ($1, $2) and $@ to handle multiple inputs efficiently. The key takeaway is straightforward: automation starts with how well you structure small things. This foundation is what enables everything else in system scripting and DevOps. #ShellScripting #Bash #Linux #Automation #DevOps #SoftwareEngineering #BackendDevelopment #Programming #Coding #TechSkills #ContinuousLearning #Developers #Engineering #CommandLine #Productivity #Scripting #Unix #TechCareer #CodeSignal #brittonnetic CodeSignal https://lnkd.in/dAB9TMRF
To view or add a comment, sign in
-
-
🚀 Day 21/90 – DevOps Learning Journey Today I created my own Shell Scripting Cheat Sheet after completing multiple hands-on scripting tasks. 🔹 What I covered • Bash basics, variables, arguments • If-else, loops, functions • File checks and logical operators • Powerful tools: grep, awk, sed, sort, uniq • Real-world one-liners for log analysis • Error handling using set -euo pipefail 💡 Key Learning Writing a cheat sheet forced me to organize concepts clearly — Now I can quickly debug scripts without searching documentation every time. This will be my go-to reference during real DevOps tasks 🚀 Consistency is building confidence day by day 💪 #90DaysOfDevOps #DevOpsKaJosh #TrainWithShubham #ShellScripting #Linux #Automation
To view or add a comment, sign in
-
-
🚀Every Developer Should Know this: ; ; ; As developers, we often focus on frameworks, languages, and tools… But mastering the terminal is what truly boosts productivity ⚡ Here are some must-know shell commands that can make your life easier 👇 📁 File Management ls, cd, pwd, mkdir, rm, cp, mv 📄 File Handling cat, less, head, tail -f (perfect for logs 👀) 🔍 Search & Filter grep, find, wc ⚙️ Permissions chmod, chown ⚡ Process Management ps, kill, top 🌐 Networking curl, ping, wget 📦 Compression tar, zip, unzip 🔁 Power Moves | (pipes), > (redirect), >> (append) 💡 Pro Tip: The real power of shell scripting comes from combining commands. For example: cat logs.txt | grep "error" Small commands. Massive impact. Start using them daily — your future self will thank you 🙌 #Developers #Linux #ShellScripting #DevTips #Productivity #Programming #DevOps
To view or add a comment, sign in
-
-
Before containers, we had a machine. Three services. Three different Python versions. Three different opinions about what should be in /tmp. The solutions were bad. Separate VMs were expensive and slow to spin up. Config management was fragile, Chef and Puppet could get you to "probably right" but not "reliably reproducible." Manual isolation wasn't isolation at all. Docker in 2013 didn't invent anything. cgroups were in the kernel in 2006. Namespaces existed before that. What Docker built was a well-designed interface on top of things Linux already knew how to do, and packaged it in a way developers could actually use. Understanding that history matters for one reason: if you know why containers were invented, you know what they're actually solving, and what they're not. They're excellent at process isolation and dependency management. They're not a security boundary by themselves. The tool is the solution to a specific problem. Know the problem. Tell me, What’s a time when understanding namespaces or cgroups would’ve saved you hours? #Docker #Linux #DevOps #Containers #Infrastructure #CloudNative #SoftwareEngineering #History #opensource
To view or add a comment, sign in
-
Automating the Repetitive So Reliability Can Move Faster with Linux, PowerShell, and Python ⚙️🐧🐍 In my experience, Linux, PowerShell, and Python were not three separate skills sitting on a resume. They worked like a three-gear transmission for automation, each one handling a different layer of operational work so teams could move faster with fewer manual mistakes 🚀 I used Linux as the operating backbone for automation-heavy environments, especially for server administration, cron-based jobs, shell-driven maintenance tasks, service control, log inspection, package handling, and runtime troubleshooting. Linux automation helped turn repetitive operating tasks into predictable routines instead of late-night handwork under pressure 🐧 With PowerShell, I focused on structured administrative workflows, especially where Windows-heavy systems, Azure-style operations, or scripted cloud tasks needed stronger command-line control. It was useful for repeatable admin sequences, resource handling, environment checks, and reducing click-driven operations that tend to drift over time ⚡ Python added the real orchestration brain. It helped me build reusable scripts with logic, conditions, loops, API integrations, data parsing, and automation flows that went beyond simple shell commands. When a task needed intelligence instead of just execution, Python became the tool that stitched systems together cleanly 🐍 Together, these tools supported provisioning, configuration, patching, monitoring checks, deployment validation, CI/CD tasks, and cloud operations. That combination reduced manual drift, improved consistency, and made infrastructure behavior much easier to trust across environments 🔁 For me, automation with Linux, PowerShell, and Python was never about writing scripts for the sake of scripting. It was about removing friction, lowering human error, and giving operations the kind of repeatability that reliable systems quietly depend on every day ☁️ #Linux #PowerShell #Python #Automation #DevOps #SRE #CloudEngineering #InfrastructureAutomation #CICD #PlatformEngineering
To view or add a comment, sign in
Explore related topics
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