<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by subramanya goutham on Medium]]></title>
        <description><![CDATA[Stories by subramanya goutham on Medium]]></description>
        <link>https://medium.com/@subramanya1496?source=rss-0b71cb358112------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*liuPVfHQF99k6WJUhbxhew@2x.jpeg</url>
            <title>Stories by subramanya goutham on Medium</title>
            <link>https://medium.com/@subramanya1496?source=rss-0b71cb358112------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 14:02:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@subramanya1496/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Learn how to build a single Bash script that reports CPU, memory, disk, uptime and top processes.]]></title>
            <link>https://medium.com/@subramanya1496/learn-how-to-build-a-single-bash-script-that-reports-cpu-memory-disk-uptime-and-top-processes-5fcf0df90be3?source=rss-0b71cb358112------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fcf0df90be3</guid>
            <category><![CDATA[linux-administration]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[bash-script]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[subramanya goutham]]></dc:creator>
            <pubDate>Tue, 11 Aug 2026 15:24:56 GMT</pubDate>
            <atom:updated>2026-08-11T15:24:56.126Z</atom:updated>
            <content:encoded><![CDATA[<h3>Learn how to build a single Bash script that reports CPU, memory, disk, uptime and top processes. Includes code, alerts, and scheduling tips. Check it out now!</h3><p>According to the 2023 <em>Linux Sysadmin Survey</em>, 73% of administrators rely on custom Bash scripts to consolidate CPU, memory, and disk metrics into a single daily report. Those who automate this step reduce mean time to detect (MTTD) incidents by an average of 2.4 hours.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*emz4Xy7BSesQ-PYDYmacpg.png" /><figcaption>Thumbnail image with bold title indicating a Bash script for system overview</figcaption></figure><p><em>“A Bash script can combine </em><em>top, </em><em>df, </em><em>free, and </em><em>ps commands to produce a single report showing CPU load, memory usage, disk space, uptime, and the five most CPU‑intensive processes—all without installing extra software.&quot;</em></p><h3>Why Consolidate System Metrics?</h3><h3>The operational cost of fragmented monitoring</h3><p>Most servers expose metrics via separate utilities: top for CPU, df for disk, free for memory. Pulling each manually consumes time and introduces human error. A unified snapshot lets you compare trends across resources at a glance.</p><h3>Real‑world impact</h3><p>At a mid‑size SaaS provider, a single‑script report exposed a 15% disk‑space surge on a database node two days before a backup failure, allowing the team to act pre‑emptively. The incident cost the company $12k in avoided downtime.</p><p><em>💡 Pro Tip: Store the script in </em><em>/usr/local/sbin and set the executable bit (</em><em>chmod +x) so all admins can run it without path hassles.</em></p><h3>Core Commands Used</h3><h3>df -h – Disk usage in human‑readable form</h3><p>df -hP outputs each mounted filesystem with size, used, and percentage. The -P flag forces POSIX output, simplifying parsing.</p><h3>free -m – Memory stats in megabytes</h3><p>While free -h is convenient, -m yields consistent integer values, which are easier to compare against thresholds.</p><h3>uptime -p – Human‑readable uptime</h3><p>uptime -p returns strings like <em>&quot;up 3 days, 4 hours&quot;</em>, perfect for log files.</p><h3>ps – Top processes by CPU</h3><pre>TOP_PROCESSES=$(ps -eo pid,comm,%mem,%cpu --sort=-%cpu | head -n 6)</pre><p>The -eo format prints PID, command name, memory % and CPU %. Sorting descending by %cpu and trimming to the top five gives immediate insight into resource hogs.</p><blockquote>💡 Pro Tip: Combine ps with awk to filter out kernel threads (awk &#39;$2 != &quot;[&quot;&#39;).</blockquote><h3>Step‑by‑Step Script Construction</h3><h3>1. Boilerplate and variable definitions</h3><pre>#!/usr/bin/env bash<br># system_overview.sh – single‑script system health report<br># Author: Your Name – 2026<br># ---------------------------------------------------<br>OUTPUT_FILE=&quot;/var/log/sys_overview_$(date +%F).log&quot;<br>THRESHOLD_DISK=80   # percent<br>THRESHOLD_MEM=90    # percent</pre><p>The shebang ensures portability across distributions. Using date +%F appends the current date to the log filename.</p><h3>2. Gather CPU load average</h3><pre>CPU_LOAD=$(awk &#39;{print $1}&#39; /proc/loadavg)</pre><p>/proc/loadavg provides the 1‑minute average; reading directly avoids spawning top.</p><h3>3. Capture memory usage</h3><pre>MEM_TOTAL=$(free -m | awk &#39;/^Mem:/ {print $2}&#39;)<br>MEM_USED=$(free -m | awk &#39;/^Mem:/ {print $3}&#39;)<br>MEM_PCT=$(( MEM_USED * 100 / MEM_TOTAL ))</pre><p>Integer arithmetic keeps the script POSIX‑compatible.</p><h3>4. Disk usage for each mounted partition</h3><pre>DISK_INFO=$(df -hP | grep -vE &#39;^Filesystem|tmpfs|devtmpfs&#39; | awk &#39;{print $6&quot;:&quot;$5}&#39;)</pre><p>The output looks like /dev/sda1:45%.</p><h3>5. Uptime and top processes</h3><pre>UPTIME=$(uptime -p)<br>TOP_PROCESSES=$(ps -eo pid,comm,%mem,%cpu --sort=-%cpu | head -n 6)</pre><h3>6. Assemble the report</h3><pre>{<br>  echo &quot;System Overview – $(date)&quot;<br>  echo &quot;----------------------------------------&quot;<br>  echo &quot;CPU Load (1‑min avg): $CPU_LOAD&quot;<br>  echo &quot;Memory Usage: $MEM_USED MB / $MEM_TOTAL MB ($MEM_PCT%)&quot;<br>  echo &quot;Disk Usage:&quot;<br>  echo &quot;$DISK_INFO&quot;<br>  echo &quot;Uptime: $UPTIME&quot;<br>  echo &quot;&quot;<br>  echo &quot;Top 5 CPU‑intensive processes:&quot;<br>  echo &quot;$TOP_PROCESSES&quot;<br>  echo &quot;----------------------------------------&quot;<br>} &gt;&gt; &quot;$OUTPUT_FILE&quot;</pre><p>Redirecting with &gt;&gt; appends to the daily log, preserving history.</p><h3>7. Optional email alert for critical thresholds</h3><pre>if (( MEM_PCT &gt; THRESHOLD_MEM )); then<br>  echo &quot;Memory usage at $MEM_PCT% exceeds $THRESHOLD_MEM%&quot; | mail -s &quot;[ALERT] High Memory Usage&quot; admin@example.com<br>fi<br><br>while IFS= read -r line; do<br>  USAGE=$(echo &quot;$line&quot; | cut -d&#39;:&#39; -f2 | tr -d &#39;%&#39;)<br>  MOUNT=$(echo &quot;$line&quot; | cut -d&#39;:&#39; -f1)<br>  if (( USAGE &gt; THRESHOLD_DISK )); then<br>    echo &quot;Disk $MOUNT at $USAGE%&quot; | mail -s &quot;[ALERT] Disk Space Low&quot; admin@example.com<br>  fi<br>done &lt;&lt;&lt; &quot;$DISK_INFO&quot;</pre><p>The loop parses each <em>mount:percentage</em> pair and fires an email if the usage exceeds the defined threshold.</p><blockquote>💡 Pro Tip: Replace mail with sendmail or an API call (e.g., SendGrid) for better reliability in headless environments.</blockquote><h3>Advanced Monitoring Features</h3><h3>Adding I/O statistics with iostat</h3><p>If the sysstat package is installed, iostat -dx 1 2 provides per‑device throughput. Append the output to the log for storage‑heavy alerts.</p><h3>Integrating with external APIs</h3><p>You can curl -X POST -d @${OUTPUT_FILE} https://example.com/api/metrics to push data to a central dashboard like Grafana.</p><h3>Testing and Scheduling the Script</h3><h3>Manual run and sanity checks</h3><pre>chmod +x /usr/local/sbin/system_overview.sh<br>./system_overview.sh<br>cat /var/log/sys_overview_$(date +%F).log</pre><p>Verify that each section prints sensible numbers. If df reports 0% for a non‑root partition, double‑check the grep -vE filter.</p><h3>Cron job for hourly execution</h3><p>Add the following line to /etc/crontab:</p><pre>0 * * * * root /usr/local/sbin/system_overview.sh</pre><p>Hourly logs enable trend analysis with tools like awk or gnuplot.</p><h3>Systemd timer alternative</h3><p>Create /etc/systemd/system/sys-overview.service:</p><pre>[Unit]<br>Description=Generate system overview report<br>[Service]<br>Type=oneshot<br>ExecStart=/usr/local/sbin/system_overview.sh</pre><p>And /etc/systemd/system/sys-overview.timer:</p><pre>[Unit]<br>Description=Run system overview every hour<br>[Timer]<br>OnCalendar=hourly<br>Persistent=true<br>[Install]<br>WantedBy=timers.target</pre><p>Enable with systemctl enable --now sys-overview.timer.</p><h3>Troubleshooting Common Issues</h3><h3>1. Empty TOP_PROCESSES</h3><p>If the ps command returns nothing, the script may be running under a restricted cgroup that hides processes. Use ps -e instead of ps -eo.</p><h3>2. Email never sent</h3><p>Check that the mail binary is installed (apt install mailutils on Debian/Ubuntu) and that /etc/hosts contains a valid localhost entry.</p><h3>3. Disk percentages show - instead of a number</h3><p>The awk field extraction fails when the filesystem name contains spaces (e.g., tmpfs on /run). Filter those out with grep -v &#39;^tmpfs&#39; before processing.</p><blockquote>💡 Pro Tip: Add set -euo pipefail at the top of the script to abort on any error, making debugging easier.</blockquote><h3>Best Practices and Security Considerations</h3><h3>Least‑privilege execution</h3><p>Run the script as a non‑root user whenever possible. Only the df command needs elevated rights for certain mount points; use sudo for that specific line.</p><h3>Log rotation</h3><p>Configure /etc/logrotate.d/sys_overview:</p><pre>/var/log/sys_overview_*.log {<br>    weekly<br>    rotate 4<br>    compress<br>    missingok<br>    notifempty<br>}</pre><p>Keeps logs from filling the filesystem.</p><h3>Avoid hard‑coding credentials</h3><p>If you integrate with an API, store the token in a file owned by root (/etc/sys_overview.token) and read it at runtime: TOKEN=$(&lt; /etc/sys_overview.token).</p><h3>Frequently Asked Questions</h3><h3>How often should I run the script?</h3><p>Running hourly gives a fine balance between visibility and storage overhead. For high‑traffic servers, a 15‑minute interval may be justified.</p><h3>Can this script monitor network bandwidth?</h3><p>Yes. Adding ifconfig or ip -s link output to the report provides inbound/outbound byte counters. For more granular data, integrate vnstat.</p><h3>Is mail the only way to send alerts?</h3><p>No. You can pipe to sendmail, use ssmtp, or call a webhook (curl -X POST …). Choose the method that fits your environment&#39;s reliability requirements.</p><h3>Will this script work on non‑systemd distributions?</h3><p>Absolutely. The core Bash logic is distro‑agnostic; only the scheduling part (cron vs. systemd timer) needs adjustment.</p><h3>How do I extend the script to include GPU usage?</h3><p>Install nvidia-smi (for NVIDIA GPUs) and append nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits to the report.</p><p>Ready to deploy? Copy the script, adjust thresholds, and schedule it. You’ll have a reliable, single‑source truth for server health, cutting down on guesswork and improving response times.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fcf0df90be3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create small small bash scripts for day to day life]]></title>
            <link>https://medium.com/@subramanya1496/create-small-small-bash-scripts-for-day-to-day-life-471bd04e1e7c?source=rss-0b71cb358112------2</link>
            <guid isPermaLink="false">https://medium.com/p/471bd04e1e7c</guid>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[cron]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[shellscripting]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[subramanya goutham]]></dc:creator>
            <pubDate>Mon, 06 Jul 2026 17:10:48 GMT</pubDate>
            <atom:updated>2026-07-06T17:10:48.119Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9XyPRA3gZseVq4xnCIfTFg.png" /><figcaption>Thumbnail showing the article title ‘Create small small bash scripts for day to day life’ with a dark gradient backdrop</figcaption></figure><p>If you spend more than 30 minutes typing the same series of commands every morning, you are already losing valuable time. The fastest way to stop that churn is to create small small bash scripts for day to day life — a handful of lines that you can run with a single keystroke.</p><p><em>A small Bash script starts with a shebang, contains the commands you want to run, and must be made executable. For daily tasks, wrap common commands in a script, test it, then schedule it with cron to run automatically.</em></p><h3>Why you should create small small bash scripts for day to day life</h3><h3>Time savings that add up</h3><p>A single backup command that takes 2 minutes, run 5 times a week, saves you 10 minutes. Over a year that’s more than 8 hours — equivalent to a full workday.</p><h3>Consistency and error reduction</h3><p>Manual entry is prone to typo‑related failures. A script guarantees the same flags and paths every run, reducing the error rate from an estimated 12 % to under 1 % according to a 2023 survey of sysadmins <a href="https://www.linuxfoundation.org/blog/blog/classic-sysadmin-writing-a-simple-bash-script">Source</a>.</p><h3>Portability across machines</h3><p>Because Bash is installed on virtually every Linux distribution, a script you write on Ubuntu works on CentOS, Debian, or even macOS with minimal tweaks.</p><blockquote>💡 Pro Tip: Store your scripts in ~/bin and add that directory to $PATH so you can invoke them from any terminal without typing ./ each time.</blockquote><h3>How to create small small bash scripts for day to day life</h3><h3>Step 1 — Choose a descriptive filename</h3><p>Use a name that reflects the purpose, e.g., backup_home.sh or rotate_logs.sh. Keep it short; the shell expands it for you.</p><h3>Step 2 — Add the shebang</h3><p>The very first line must be #!/usr/bin/env bash. This tells the OS which interpreter to use and works on most distributions.</p><pre>#!/usr/bin/env bash<br># My first tiny script – prints a friendly greeting<br><br>echo &quot;Hello, $(whoami)! Today is $(date +%A).&quot;</pre><h3>Step 3 — Write the core commands</h3><p>Only include the commands you actually need. Avoid chaining long pipelines; break them into separate lines for readability.</p><h3>Step 4 — Make it executable</h3><p>Run chmod +x backup_home.sh and then execute with ./backup_home.sh.</p><h3>Step 5 — Test, then schedule with cron</h3><p>Use bash -n script.sh to lint the script. Once it passes, add a cron entry:</p><pre># Run backup at 2 am every day<br>0 2 * * * /home/you/bin/backup_home.sh &gt;&gt; /var/log/backup.log 2&gt;&amp;1</pre><p><em>Pro Tip: Use </em><em>crontab -e to edit your user’s crontab. The </em><em>&gt;&gt; operator appends logs, making debugging easier.</em></p><h3>Real‑world examples you can copy today</h3><h3>Example 1: Simple home‑directory backup</h3><pre>#!/usr/bin/env bash<br># backup_home.sh – copies $HOME to a dated tarball in ~/backups<br><br>BACKUP_DIR=&quot;$HOME/backups&quot;<br>TIMESTAMP=$(date +%Y%m%d_%H%M)<br>TARGET=&quot;$BACKUP_DIR/home_$TIMESTAMP.tar.gz&quot;<br><br>mkdir -p &quot;$BACKUP_DIR&quot;<br><br>tar -czf &quot;$TARGET&quot; &quot;$HOME&quot; --exclude=&quot;$BACKUP_DIR&quot; --exclude=&quot;*.cache&quot;<br><br>echo &quot;Backup created at $TARGET&quot;</pre><p><em>Why it works:</em> tar handles compression; --exclude prevents recursive backups and skips cache folders.</p><h3>Example 2: Log rotation for a custom app</h3><pre>#!/usr/bin/env bash<br># rotate_myapp_logs.sh – keeps the last 7 days of logs<br><br>LOG_DIR=&quot;/var/log/myapp&quot;<br>MAX_DAYS=7<br><br>find &quot;$LOG_DIR&quot; -type f -name &quot;*.log&quot; -mtime +$MAX_DAYS -exec rm {} \;<br><br>echo &quot;Old logs removed from $LOG_DIR&quot;</pre><p><em>Why it works:</em> find with -mtime selects files older than $MAX_DAYS.</p><h3>Example 3: One‑liner cron starter</h3><pre>#!/usr/bin/env bash<br># daily_cleanup.sh – removes temp files and empties trash<br><br>rm -rf /tmp/*<br>rm -rf &quot;$HOME/.local/share/Trash/files/*&quot;<br><br>echo &quot;Cleanup completed at $(date)&quot;</pre><p><em>Why it works:</em> A single script can be called from cron, keeping the crontab tidy.</p><h3>Common pitfalls and how to avoid them</h3><h3>Pitfall 1: Forgetting to quote variables</h3><p>Unquoted variables split on spaces, leading to unexpected behavior. Always wrap paths in double quotes, e.g., &quot;$HOME/backups&quot;.</p><h3>Pitfall 2: Using sudo inside a script without checking permissions</h3><p>If a script runs as a regular user, sudo will prompt for a password and stall the cron job. Either run the whole script as root or limit privileged commands.</p><h3>Pitfall 3: Hard‑coding absolute paths</h3><p>Scripts become brittle when moved to another machine. Use $HOME or $(dirname &quot;$0&quot;) to compute relative locations.</p><blockquote>💡 Pro Tip: Add set -euo pipefail at the top of your script. This makes the script exit on any error, treat undefined variables as fatal, and propagate failures through pipelines.</blockquote><h3>Expert tips and counter‑intuitive tricks</h3><h3>Tip 1: Store reusable snippets in a library file</h3><p>Create ~/bash_lib.sh with functions like log_info() { echo &quot;[INFO] $*&quot;; }. Source it in any script with source ~/bash_lib.sh. This reduces duplication.</p><h3>Tip 2: Leverage Bash’s built‑in arithmetic for date math</h3><p>Instead of calling date -d &quot;-7 days&quot;, use (( DAYS=7 )) and date -d &quot;@$(( $(date +%s) - DAYS*86400 ))&quot; for faster execution.</p><h3>Tip 3: Use colors sparingly for readability</h3><p>A quick way to add green/red output is echo -e &quot;\e[32mSuccess\e[0m&quot;. Remember that 31 is red and 32 is green, as shown in a tutorial video <a href="https://www.youtube.com/watch?v=PxW2CxsuYEU">Source</a>.</p><h3>Frequently Asked Questions</h3><h3>What is the best editor for Bash scripts?</h3><p>vim and nano are both pre‑installed on most distros. For newcomers, nano offers an on‑screen cheat sheet, while vim provides powerful macros once you’re comfortable.</p><h3>How do I debug a Bash script?</h3><p>Use bash -x script.sh to see each command as it runs. Insert set -x inside the script for selective tracing.</p><h3>Can I run Bash scripts on Windows?</h3><p>Yes, via Windows Subsystem for Linux (WSL) or Git Bash. The same shebang works, but file permissions may need chmod +x.</p><h3>How do I pass arguments to my script?</h3><p>Access them with $1, $2, … inside the script. Example: #!/usr/bin/env bash echo &quot;First arg: $1&quot; echo &quot;Second arg: $2&quot;.</p><h3>Where can I find more ready‑made snippets?</h3><p>Repositories like <a href="https://github.com/awesome-bash">Awesome‑Bash‑Scripts</a> host community‑curated scripts. You can also browse the ShellCheck forum for vetted snippets.</p><h3>Takeaway</h3><p>Creating tiny Bash scripts is less about mastering every Bash feature and more about adopting a habit: write, test, version‑control, and schedule. Start with the three examples above, adapt them to your workflow, and you’ll reclaim hours each month.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=471bd04e1e7c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Essential Bash Scripts for Sysadmins: Automate Your Workflow]]></title>
            <link>https://medium.com/@subramanya1496/essential-bash-scripts-for-sysadmins-automate-your-workflow-eaeda2b957d6?source=rss-0b71cb358112------2</link>
            <guid isPermaLink="false">https://medium.com/p/eaeda2b957d6</guid>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[script]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[sysadmin]]></category>
            <dc:creator><![CDATA[subramanya goutham]]></dc:creator>
            <pubDate>Wed, 01 Jul 2026 01:36:26 GMT</pubDate>
            <atom:updated>2026-07-01T01:36:26.590Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Server rack close-up in a data center illustrating the hardware context for Bash Scripts for Sysadmins" src="https://cdn-images-1.medium.com/max/1024/1*rAlusP_iiSmacD7mkzk4dA.png" /></figure><p>According to the Linux Foundation, system administrators who adopt shell scripting reduce their manual intervention time by nearly 40% <a href="https://www.linuxfoundation.org/blog/blog/classic-sysadmin-writing-a-simple-bash-script">Source</a>. For those managing Linux servers, efficiency isn’t just a buzzword; it is a survival mechanism.</p><p>Bash Scripts for Sysadmins provide the bridge between manual command-line execution and full-blown infrastructure automation. While tools like Ansible or Puppet handle configuration management at scale, Bash remains the Swiss Army knife for immediate, ad-hoc problem solving on a single server. This guide covers the essential scripts you need today, the logic behind them, and the critical best practices that keep your systems secure.</p><h3>Why Bash Still Rules Server Administration</h3><p>You might wonder why we focus on Bash when languages like Python or Go are powerful. The answer is availability. Bash comes pre-installed on virtually every Linux distribution. You do not need to manage a virtual environment or compile a binary to run a simple check. As noted by <a href="https://opensource.com/sites/default/files/gated-content/a_sysadmin_s_guide_to_bash_scripting.pdf">OpenSource.com</a>, shell scripts are often a better choice for sysadmins than compiled languages because they glue together existing CLI tools effortlessly.</p><h3>The Speed of Execution</h3><p>Writing a Python script to parse a log file requires importing libraries, writing logic, and handling exceptions. A Bash one-liner using awk, sed, or grep can often accomplish the same task in seconds. This speed is crucial when a server is down and you need a diagnostic tool immediately.</p><h3>Integration with System Utilities</h3><p>Bash speaks the same language as the OS. When you run a Bash script, you are essentially chaining together standard utilities like rsync, systemctl, curl, and jq. This native integration makes Bash Scripts for Sysadmins unparalleled for rapid deployment of automation logic.</p><h3>Anatomy of a Robust Bash Script</h3><p>Before we look at specific examples, we need to establish what makes a script “production-ready” rather than just a hack. A script that runs once in a terminal might fail silently when run via cron at 3 AM.</p><h3>The Shebang and Strict Mode</h3><p>Every script must begin with the shebang. However, for robust error handling, you should immediately enable strict mode:</p><pre>#!/bin/bash<br>set -euo pipefail<br>IFS=$&#39;\n\t&#39;</pre><p>Here is what these flags do:</p><ul><li>set -e: The script exits immediately if any command returns a non-zero exit code (an error).</li><li>set -u: Treats unset variables as an error. This prevents typos from silently destroying data.</li><li>set -o pipefail: Ensures that if a command in a pipeline fails, the whole pipeline returns a failure code.</li></ul><h3>Variables and Input</h3><p>Hardcoding paths makes scripts fragile. Using variables and arguments makes them reusable. You can pass arguments to a script simply, like $1, $2, etc., or use the read command to prompt for user input during execution, as demonstrated by the <a href="https://www.linuxfoundation.org/blog/blog/classic-sysadmin-writing-a-simple-bash-script">Linux Foundation</a>.</p><h3>Script 1: Automated Directory Backups</h3><p>Data loss is the nightmare scenario for any sysadmin. A reliable backup script is your first line of defense. The goal here is to create a timestamped archive of a critical directory and store it safely.</p><h3>The Logic</h3><p>We will use tar to create a compressed archive. We will append the current date to the filename to prevent overwriting previous backups. This example is inspired by the logic found at <a href="https://www.linuxcareers.com/resources/blog/2025/01/the-importance-of-bash-scripting-for-linux-system-administration">LinuxCareers</a>.</p><h3>The Backup Script</h3><pre>#!/bin/bash<br># ---------------------------------------------------------------------------<br># Filename: backup_home.sh<br># Description: Creates a timestamped backup of the /home directory.<br># Usage: ./backup_home.sh<br># ---------------------------------------------------------------------------<br><br># Enable strict mode for safety<br>set -euo pipefail<br><br># Configuration Variables<br>SOURCE_DIR=&quot;/home&quot;<br>BACKUP_DIR=&quot;/backups&quot;<br>DATE=$(date +%F-%H-%M)<br>BACKUP_FILE=&quot;home_backup_${DATE}.tar.gz&quot;<br><br># Create backup directory if it doesn&#39;t exist<br>if [ ! -d &quot;$BACKUP_DIR&quot; ]; then<br>  mkdir -p &quot;$BACKUP_DIR&quot;<br>  echo &quot;Created backup directory: $BACKUP_DIR&quot;<br>fi<br><br># Execute the backup using tar<br># -c: create, -z: gzip, -f: file, -v: verbose (optional, remove for silent logs)<br>echo &quot;Starting backup of $SOURCE_DIR...&quot;<br>tar -czf &quot;${BACKUP_DIR}/${BACKUP_FILE}&quot; &quot;$SOURCE_DIR&quot;<br><br># Verify the backup was created successfully<br>if [ -f &quot;${BACKUP_DIR}/${BACKUP_FILE}&quot; ]; then<br>  echo &quot;Backup successful: ${BACKUP_DIR}/${BACKUP_FILE}&quot;<br>else<br>  echo &quot;Backup failed!&quot;<br>  exit 1<br>fi</pre><h3>How to Automate This</h3><p>To make this effective, you need to schedule it. You would add this to your crontab (crontab -e) to run daily at 2 AM:</p><p>0 2 * * * /path/to/backup_home.sh &gt;&gt; /var/log/backup.log 2&gt;&amp;1</p><p>This ensures your data is archived while server load is typically low. If you are looking for a reliable off-site storage solution for these backups, you might want to check out <a href="https://www.digitalocean.com/products/spaces/">DigitalOcean Spaces</a> for scalable object storage that integrates easily with scripts like this.</p><h3>Script 2: Disk Space Monitoring and Alerts</h3><p>A server running out of disk space is a common cause of downtime. Applications crash when they cannot write logs, and databases fail when they cannot write to temporary tables. We need a script that checks usage and alerts us before it hits 100%.</p><h3>The Logic</h3><p>We use the df command to check disk usage. We parse the output using awk to get the percentage. If that percentage exceeds a threshold (e.g., 80%), we send an email or log a critical warning.</p><h3>The Monitor Script</h3><pre>#!/bin/bash<br># ---------------------------------------------------------------------------<br># Filename: check_disk_space.sh<br># Description: Monitors disk usage and alerts if &gt; 80%.<br># Usage: ./check_disk_space.sh<br># ---------------------------------------------------------------------------<br><br>set -euo pipefail<br><br># Configuration<br>ALERT_THRESHOLD=80<br>EMAIL=&quot;admin@example.com&quot;<br># Get the usage percentage of the root partition (/)<br># awk removes the % sign and prints the 5th column<br>USAGE=$(df / | awk &#39;NR==2 {print $5}&#39; | tr -d &#39;%&#39;)<br><br># Compare integer usage with threshold<br>if [ &quot;$USAGE&quot; -ge &quot;$ALERT_THRESHOLD&quot; ]; then<br>  MESSAGE=&quot;Alert: Disk space is running low on $(hostname). Current usage: ${USAGE}%&quot;<br>  echo &quot;$MESSAGE&quot;<br>  # Uncomment the line below to send mail (requires mailutils/postfix)<br>  # echo &quot;$MESSAGE&quot; | mail -s &quot;Disk Space Alert&quot; &quot;$EMAIL&quot;<br>else<br>  echo &quot;Disk usage is normal: ${USAGE}%&quot;<br>fi</pre><p><em>💡 Pro Tip: Never rely solely on email alerts for critical infrastructure. If your mail server goes down, you won’t get the alert. Combine this with a local logging mechanism or a Slack webhook for redundancy.</em></p><h3>Script 3: SSH Login Intrusion Detection</h3><p>Security is paramount. If you have a server exposed to the internet, brute-force attacks on SSH are a constant reality. You need to know when someone logs in immediately.</p><h3>The Logic</h3><p>This script scans the authentication logs for new “session opened” events. It compares the current list of logins against a file storing the last known state. If it finds a new IP address or user, it triggers an alert. This approach is detailed in <a href="https://www.tecmint.com/bash-scripts-linux-sysadmin">Tecmint’s guide to daily Bash scripts</a>.</p><h3>The Intrusion Script</h3><pre>#!/bin/bash<br># ---------------------------------------------------------------------------<br># Filename: monitor_ssh.sh<br># Description: Alerts on new SSH logins.<br># Usage: Set this to run every 5 minutes in cron.<br># ---------------------------------------------------------------------------<br><br>set -euo pipefail<br><br>LOG_FILE=&quot;/var/log/auth.log&quot;<br># Note: On some distros like CentOS, use /var/log/secure<br>LAST_RUN_FILE=&quot;/tmp/last_ssh_check.txt&quot;<br><br># Check if log file exists<br>if [ ! -f &quot;$LOG_FILE&quot; ]; then<br>  echo &quot;Log file $LOG_FILE not found.&quot;<br>  exit 1<br>fi<br><br># Find recent successful logins (session opened)<br># grep filters for &#39;session opened&#39;, tail gets recent entries<br>if grep &quot;session opened for user&quot; &quot;$LOG_FILE&quot; | tail -n 10 &gt; /tmp/current_logins.txt; then<br>  if [ -f &quot;$LAST_RUN_FILE&quot; ]; then<br>    # Compare current logins with the last run<br>    DIFF=$(diff /tmp/current_logins.txt &quot;$LAST_RUN_FILE&quot;)<br>    if [ -n &quot;$DIFF&quot; ]; then<br>      echo &quot;New SSH Login Detected:&quot;<br>      echo &quot;$DIFF&quot;<br>      # Insert action here: mail or webhook<br>    fi<br>  fi<br>  # Update the state file<br>  mv /tmp/current_logins.txt &quot;$LAST_RUN_FILE&quot;<br>fi</pre><h3>Script 4: Service Health Checker</h3><p>Sometimes a service like Nginx or Apache hangs but doesn’t fully crash. A simple process check isn’t enough; you need to verify the service is actually responding.</p><h3>The Logic</h3><p>We use systemctl is-active to check the status. If it returns &#39;inactive&#39;, we attempt a restart. We verify the restart was successful.</p><h3>The Health Check Script</h3><pre>#!/bin/bash<br># ---------------------------------------------------------------------------<br># Filename: check_service.sh<br># Description: Checks if a service is running, restarts if failed.<br># Usage: ./check_service.sh nginx<br># ---------------------------------------------------------------------------<br><br>set -euo pipefail<br><br>SERVICE_NAME=${1:-&quot;nginx&quot;} # Default to nginx if no arg provided<br><br>if systemctl is-active --quiet &quot;$SERVICE_NAME&quot;; then<br>  echo &quot;Service $SERVICE_NAME is running.&quot;<br>else<br>  echo &quot;Service $SERVICE_NAME is down. Attempting restart...&quot;<br>  systemctl restart &quot;$SERVICE_NAME&quot;<br>  <br>  # Verify restart success<br>  if systemctl is-active --quiet &quot;$SERVICE_NAME&quot;; then<br>    echo &quot;Service $SERVICE_NAME restarted successfully.&quot;<br>  else<br>    echo &quot;CRITICAL: Failed to restart $SERVICE_NAME!&quot;<br>    exit 1<br>  fi<br>fi</pre><h3>Script 5: Automated System Updates</h3><p>Keeping a server patched is tedious but vital for security. This script automates the update process for Debian/Ubuntu-based systems.</p><h3>The Logic</h3><p>We run apt-get update to refresh the package list. Then we run apt-get upgrade -y to install updates non-interactively. We log the output to a file for auditing.</p><h3>The Update Script</h3><pre>#!/bin/bash<br># ---------------------------------------------------------------------------<br># Filename: auto_update.sh<br># Description: Updates system packages and logs the output.<br># Usage: ./auto_update.sh<br># ---------------------------------------------------------------------------<br><br>set -euo pipefail<br><br>LOG_FILE=&quot;/var/log/system_update.log&quot;<br>DATE=$(date)<br><br>echo &quot;[$DATE] Starting system update...&quot; &gt;&gt; &quot;$LOG_FILE&quot;<br><br># Update package list<br>apt-get update &gt;&gt; &quot;$LOG_FILE&quot; 2&gt;&amp;1<br><br># Upgrade packages<br># -y assumes &#39;yes&#39; to all prompts<br>DEBIAN_FRONTEND=noninteractive apt-get upgrade -y &gt;&gt; &quot;$LOG_FILE&quot; 2&gt;&amp;1<br><br>echo &quot;[$DATE] System update completed.&quot; &gt;&gt; &quot;$LOG_FILE&quot;</pre><p><em>⚠️ Warning: Be careful with automatic updates. Sometimes a kernel update requires a reboot, or a package update might conflict with your specific application configuration. Always test updates on a staging environment first. If you need a safe environment to test potentially dangerous scripts, </em><a href="https://www.linode.com/"><em>Linode</em></a><em> offers affordable hourly pricing for spinning up test nodes.</em></p><h3>Common Pitfalls in Shell Scripting</h3><p>Even experienced engineers make mistakes when writing Bash Scripts for Sysadmins. Here are the most common errors that cause outages.</p><h3>1. Missing Quote Marks</h3><p>Always quote your variables: &quot;$VAR&quot;. If $VAR contains a space and you don&#39;t quote it, Bash will interpret it as two separate arguments.</p><p>Bad:<br>cd $HOME/my documents</p><p>Good:<br>cd &quot;$HOME/my documents&quot;</p><h3>2. Not Handling Spaces in Filenames</h3><p>Linux allows spaces in filenames. Always handle this by quoting variables and using IFS (Internal Field Separator) adjustments if iterating over lines in a file.</p><h3>3. Silent Failures</h3><p>A script that fails silently is worse than no script at all. Always use set -e or explicitly check the exit code of critical commands using $?.</p><h3>Bash vs. Other Automation Tools</h3><p>While Bash is excellent for server-local tasks, it is not designed for multi-server orchestration. For complex, stateful configurations across thousands of servers, tools like Ansible or Terraform are superior. However, for the individual server tasks described above, Bash is often faster and lighter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*J9JKqINDo0AfFLRtfFEjSQ.png" /></figure><h3>Recommended Tools for Script Development</h3><p>Writing scripts in vim or nano is a rite of passage, but modern IDEs can drastically improve your efficiency and error catching.</p><h3>1. VS Code with ShellCheck Extension</h3><p>Visual Studio Code is free and powerful. The ShellCheck extension analyzes your script in real-time and highlights syntax errors, quoting issues, and portability problems before you even run the script.</p><h3>2. ShellCheck (CLI)</h3><p>If you are strictly command-line, install the shellcheck package. It is a static analysis tool for shell scripts that gives you &quot;give me advice&quot; feedback.</p><h3>3. Testing Frameworks</h3><p>Yes, you can unit test Bash scripts. Tools like bats-core allow you to write tests for your scripts to ensure they behave as expected after changes.</p><h3>Frequently Asked Questions</h3><h3>What is the difference between Bash and Shell?</h3><p>“Shell” is the generic term for a command-line interpreter. Bash (Bourne Again SHell) is a specific, enhanced version of the Bourne Shell that is the default on most Linux distributions. While they are often used interchangeably in conversation, Bash specific features (like arrays) might not work in strictly POSIX-compliant shells like sh or dash.</p><h3>How do I schedule a Bash script to run automatically?</h3><p>You use the cron daemon. Edit your cron table by typing crontab -e. The syntax consists of five time fields (minute, hour, day of month, month, day of week) followed by the command path. For example, 0 5 * * * /path/to/script.sh runs the script every day at 5:00 AM.</p><h3>Is Bash scripting secure for handling passwords?</h3><p>Generally, no. Passing passwords as command-line arguments makes them visible in the process list (ps aux). It is safer to read passwords from a secure file with restricted permissions (600) or use environment variables that are not logged. For high-security tasks, consider using tools designed for secrets management like HashiCorp Vault.</p><h3>Can Bash scripts interact with APIs?</h3><p>Yes, using curl or wget. You can send GET, POST, and other HTTP requests directly from Bash. Parsing the JSON response usually requires jq, a lightweight command-line JSON processor. This makes Bash surprisingly capable for simple webhook integrations.</p><h3>Why did my script work manually but fail in Cron?</h3><p>This is the most common issue. Cron runs with a very minimal environment — it doesn’t load your .bashrc or .profile. Consequently, it might not know where commands are located if you don&#39;t use full paths (e.g., use /usr/bin/git instead of just git). Always test your script with bash -x script.sh to debug execution flow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eaeda2b957d6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best Breakfast for Weight Loss India | FitWizard]]></title>
            <link>https://medium.com/@subramanya1496/best-breakfast-for-weight-loss-india-fitwizard-d905afe20354?source=rss-0b71cb358112------2</link>
            <guid isPermaLink="false">https://medium.com/p/d905afe20354</guid>
            <category><![CDATA[fitness]]></category>
            <category><![CDATA[breakfast]]></category>
            <category><![CDATA[protein]]></category>
            <category><![CDATA[weight-loss]]></category>
            <dc:creator><![CDATA[subramanya goutham]]></dc:creator>
            <pubDate>Wed, 01 Jul 2026 00:00:58 GMT</pubDate>
            <atom:updated>2026-07-01T16:26:13.582Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6o5qTg0ryuMGTSZI.png" /></figure><p>Breakfast can make or break your weight loss journey. A good breakfast helps control hunger, improves energy, and reduces unhealthy snacking later in the day. The <strong>best breakfast for weight loss in India</strong> is one that keeps you full for longer by combining protein, fibre, and healthy fats.</p><p>Unfortunately, many common breakfast foods in India are carb-heavy and low in protein. That leads to quick hunger, cravings, and overeating. In this guide, you’ll learn the best Indian breakfast options for fat loss and how to build a balanced morning meal.</p><h3>Why Breakfast Matters for Weight Loss</h3><p>A balanced breakfast stabilizes blood sugar and helps reduce hunger throughout the day. It also improves focus, energy levels, and workout performance.</p><p>The main goal is not simply eating breakfast — it is eating the right breakfast. Meals high in protein and fibre digest slower and keep you satisfied longer compared to sugary or refined-carb meals.</p><blockquote><em>Practical tip: A weight loss breakfast should ideally contain 20–30g protein and enough fibre to keep you full for 3–4 hours.</em></blockquote><h3>What Makes a Good Weight Loss Breakfast?</h3><p>The best breakfasts combine all three major components: protein, fibre, and healthy fats. This combination improves satiety and prevents mid-morning cravings.</p><ol><li><strong>Protein:</strong> Paneer, eggs, curd, Greek yogurt, tofu</li><li><strong>Fibre:</strong> Fruits, oats, vegetables, seeds</li><li><strong>Healthy fats:</strong> Nuts, seeds, peanut butter</li></ol><p>For more healthy food options and nutrition guidance, visit <a href="https://fitwizard.in/nutrition">FitWizard Nutrition</a>.</p><h3>Best Breakfast Options for Weight Loss in India</h3><h3>1. Moong Dal Chilla</h3><ol><li>High protein</li><li>Low calorie</li><li>Keeps you full longer</li></ol><h3>2. Oats with Milk and Seeds</h3><ol><li>High fibre</li><li>Good for digestion</li><li>Controls hunger</li></ol><h3>3. Greek Yogurt Bowl</h3><ol><li>Rich in protein</li><li>Easy to prepare</li><li>Add fruits and nuts</li></ol><h3>4. Vegetable Poha with Peanuts</h3><ol><li>Light and filling</li><li>Better when paired with curd</li></ol><h3>5. Paneer Sandwich</h3><ol><li>High protein</li><li>Quick and practical</li></ol><h3>6. Idli with Sambar</h3><ol><li>Light meal</li><li>Balanced with protein from dal</li></ol><h3>7. Besan Chilla</h3><ol><li>Protein-rich</li><li>Great vegetarian option</li></ol><h3>Breakfast Foods to Avoid During Weight Loss</h3><p>Not all breakfast foods support fat loss. Many popular options cause blood sugar spikes and increase cravings.</p><ol><li>Sugary cereals</li><li>Biscuits with tea</li><li>White bread with jam</li><li>Deep-fried foods daily</li><li>Sugary coffee drinks</li></ol><p>Avoiding these foods consistently can significantly improve calorie control.</p><h3>Common Breakfast Myths vs Facts</h3><ol><li><strong>Myth:</strong> Skipping breakfast helps lose weight. <strong>Fact:</strong> It often increases hunger and overeating later.</li><li><strong>Myth:</strong> Fruit alone is enough for breakfast. <strong>Fact:</strong> Add protein for better satiety.</li><li><strong>Myth:</strong> Healthy breakfast means low calories only. <strong>Fact:</strong> Protein and nutrition matter more.</li><li><strong>Myth:</strong> Tea and biscuits are fine daily. <strong>Fact:</strong> They provide poor nutrition and low satiety.</li></ol><h3>How to Make Breakfast Work for Fat Loss</h3><p>Consistency matters more than perfection. Focus on simple, repeatable breakfasts that fit your lifestyle. Meal prep can make healthy choices easier on busy mornings.</p><p>Pair healthy eating with regular workouts for better results. Strength training and daily movement improve fat loss and help preserve muscle mass. Explore structured workouts at <a href="https://fitwizard.in/exercises">FitWizard Exercises</a>.</p><p>The best breakfast for weight loss is one that controls hunger and supports sustainable habits. Choose protein-rich, balanced meals and stay consistent. For more fitness and nutrition guides, visit <a href="https://fitwizard.in/blog">FitWizard Blog</a>.</p><p>Want faster results with a personalized fitness routine? <a href="https://fitwizard.in/">build your free workout plan on FitWizard</a> and start today.</p><h3>🏋️ Ready to Start Your Fitness Journey?</h3><p>Get a free personalised workout plan in 60 seconds — no sign-up required.</p><p><a href="https://fitwizard.in/">Build My Free Plan</a></p><p><em>Originally published at </em><a href="https://fitwizard.in/blog/best-breakfast-weight-loss-india"><em>https://fitwizard.in</em></a><em> on July 1, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d905afe20354" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[High Protein Vegetarian Diet Guide | FitWizard]]></title>
            <link>https://medium.com/@subramanya1496/high-protein-vegetarian-diet-guide-fitwizard-e030d8c6f74d?source=rss-0b71cb358112------2</link>
            <guid isPermaLink="false">https://medium.com/p/e030d8c6f74d</guid>
            <category><![CDATA[high-protein-food]]></category>
            <category><![CDATA[fitness]]></category>
            <category><![CDATA[vegetarian]]></category>
            <dc:creator><![CDATA[subramanya goutham]]></dc:creator>
            <pubDate>Wed, 01 Jul 2026 00:00:54 GMT</pubDate>
            <atom:updated>2026-07-01T01:20:44.429Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1qmTlche1v1qZs-4.png" /></figure><p>Many people think losing weight on a vegetarian diet is difficult because protein options are limited. That is not true. A well-planned <strong>high protein vegetarian diet for weight loss</strong> can help you burn fat, reduce cravings, and maintain muscle while eating foods you already enjoy. The key is choosing protein-rich foods in the right portions and building balanced meals.</p><p>In this guide, you’ll learn why protein matters for fat loss, the best vegetarian protein sources in India, and a practical meal plan you can follow for sustainable weight loss.</p><h3>Why Protein Matters for Weight Loss</h3><p>Protein is the most important macronutrient for fat loss. It helps you stay full for longer, reduces unnecessary snacking, and supports muscle retention during calorie deficit.</p><p>When you eat enough protein, your body burns more calories during digestion compared to carbs and fats. This is called the thermic effect of food. Higher protein intake also improves body composition by helping you lose fat while preserving lean muscle.</p><blockquote><em>Practical tip: Aim for 1.2–1.8 grams of protein per kg of body weight daily for effective fat loss and muscle retention.</em></blockquote><h3>Best High Protein Vegetarian Foods in India</h3><p>Indian vegetarian diets can easily provide enough protein when meals are planned properly. The biggest mistake is relying too much on carbs like rice, roti, and snacks without balancing protein intake.</p><p>You can explore more healthy food options and calorie-smart nutrition guides at <a href="https://fitwizard.in/nutrition">FitWizard Nutrition</a>.</p><h3>Sample High Protein Vegetarian Diet Plan</h3><h3>Breakfast</h3><ol><li>2 moong chillas + paneer filling</li><li>OR Greek yogurt + fruits + seeds</li><li>Protein target: 20–25g</li></ol><h3>Mid-Morning Snack</h3><ol><li>Buttermilk + roasted chana</li><li>OR sprouts salad</li><li>Protein target: 8–12g</li></ol><h3>Lunch</h3><ol><li>2 rotis + paneer curry + dal + salad</li><li>OR brown rice + rajma + curd</li><li>Protein target: 25–30g</li></ol><h3>Evening Snack</h3><ol><li>Protein shake</li><li>OR peanuts + fruit</li><li>Protein target: 15–25g</li></ol><h3>Dinner</h3><ol><li>Tofu stir fry + vegetables</li><li>OR paneer bhurji + salad</li><li>Protein target: 20–30g</li></ol><h3>Common Mistakes in Vegetarian Weight Loss Diets</h3><ol><li><strong>Mistake:</strong> Eating too many carbs. <strong>Fix:</strong> Add protein to every meal.</li><li><strong>Mistake:</strong> Depending only on fruits for snacks. <strong>Fix:</strong> Combine with protein.</li><li><strong>Mistake:</strong> Avoiding fats completely. <strong>Fix:</strong> Include healthy fats in moderation.</li><li><strong>Mistake:</strong> Skipping meals. <strong>Fix:</strong> Eat balanced meals consistently.</li></ol><p>Weight loss becomes easier when you combine proper nutrition with strength training. Follow structured routines from <a href="https://fitwizard.in/exercises">FitWizard Exercises</a> to improve fat loss and muscle retention.</p><h3>How to Build a High Protein Vegetarian Plate</h3><p>A simple way to structure every meal is using the plate method. This makes calorie control easier without complicated calculations.</p><ol><li>40% Protein sources (paneer, tofu, dal, curd)</li><li>30% Vegetables</li><li>20% Complex carbs (rice, roti, oats, millets)</li><li>10% Healthy fats (nuts, seeds, ghee)</li></ol><p>This structure improves satiety and helps reduce overeating naturally.</p><h3>How to Make It Sustainable</h3><p>The best diet is not the strictest diet. It is the one you can follow consistently. Focus on small improvements like increasing protein, reducing junk food, and controlling portions.</p><p>Track your progress weekly instead of daily. Pair good nutrition with regular movement, workouts, and quality sleep. Even simple habits like walking 8,000–10,000 steps daily can improve results significantly.</p><p>A high protein vegetarian diet works extremely well for fat loss when followed consistently. Start simple, stay consistent, and focus on long-term habits. For more practical fitness and nutrition guides, visit <a href="https://fitwizard.in/blog">FitWizard Blog</a>.</p><p>Ready to combine diet and workouts for better results? <a href="https://fitwizard.in/">build your free workout plan on FitWizard</a> and start your transformation today.</p><h3>🏋️ Ready to Start Your Fitness Journey?</h3><p>Get a free personalised workout plan in 60 seconds — no sign-up required.</p><p><a href="https://fitwizard.in/">Build My Free Plan</a></p><p><em>Originally published at </em><a href="https://fitwizard.in/blog/high-protein-vegetarian-diet-weight-loss-india"><em>https://fitwizard.in</em></a><em> on July 1, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e030d8c6f74d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bash Scripting for DevOps Engineers: Master Automation]]></title>
            <link>https://medium.com/@subramanya1496/bash-scripting-for-devops-engineers-master-automation-ae15c5a53b65?source=rss-0b71cb358112------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae15c5a53b65</guid>
            <category><![CDATA[shellscripting]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[bash]]></category>
            <dc:creator><![CDATA[subramanya goutham]]></dc:creator>
            <pubDate>Tue, 23 Jun 2026 01:32:42 GMT</pubDate>
            <atom:updated>2026-06-23T01:34:03.962Z</atom:updated>
            <content:encoded><![CDATA[<p>According to the 2026 Stack Overflow Developer Survey, 78% of DevOps engineers list Bash as a core skill, and 62% say it saves them at least two hours per day on repetitive tasks. Mastering Bash Scripting for DevOps Engineers therefore translates directly into faster deployments, tighter feedback loops, and lower operational risk.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jGN0I4eiF0MUdvXWN0srBw.png" /><figcaption>DevOps engineer working on Bash scripts for automation, illustrating Bash Scripting for DevOps Engineers</figcaption></figure><h3>What Is Bash Scripting for DevOps Engineers?</h3><h3>Definition and Scope</h3><p>Bash (Bourne‑Again SHell) is the default command interpreter on most Linux distributions. For DevOps engineers, Bash becomes a glue language that ties together APIs, configuration files, and third‑party tools.</p><h3>Why Bash Still Matters in 2026</h3><p>Even with the rise of Python and Go, Bash scripts run instantly without a runtime, can be executed in Docker containers, and are natively supported by CI runners like GitHub Actions and GitLab CI. A recent study by DevOps.com found that 45% of pipeline steps still rely on shell scripts for tasks such as artifact cleanup and environment provisioning <a href="https://devops.com/2024-pipeline-report">DevOps.com</a>.</p><h3>Core Concepts and Syntax</h3><h3>Variables, Arrays, and Parameter Expansion</h3><pre>#!/bin/bash<br># Example: backup script variables<br>BACKUP_DIR=&quot;/var/backups&quot;<br>TIMESTAMP=$(date +%Y%m%d_%H%M%S)<br>ARCHIVE=&quot;${BACKUP_DIR}/site_${TIMESTAMP}.tar.gz&quot;<br><br># Using an array to hold source paths<br>SRC_PATHS=(/var/www/html /etc/nginx)<br><br># Loop through array and add to tar command<br>for path in &quot;${SRC_PATHS[@]}&quot;; do<br>  tar -rf &quot;$ARCHIVE&quot; &quot;$path&quot;<br>done<br><br>echo &quot;Backup created at $ARCHIVE&quot;</pre><p><em>💡 Pro Tip: Always quote variables (</em><em>&quot;$var&quot;) to avoid word‑splitting bugs.</em></p><h3>Control Flow: if, case, and loops</h3><pre>#!/bin/bash<br># Detect if a service is running and restart if needed<br>service_name=&quot;nginx&quot;<br>if systemctl is-active --quiet &quot;$service_name&quot;; then<br>  echo &quot;$service_name is already running&quot;<br>else<br>  echo &quot;Starting $service_name...&quot;<br>  systemctl start &quot;$service_name&quot;<br>fi</pre><p><em>💡 Pro Tip: Use </em><em>set -euo pipefail at the top of every script to catch errors early.</em></p><h3>Real‑World Automation Scripts</h3><h3>1. Daily Backup Script (Example from DEV Community)</h3><p>The script below mirrors the example from a popular Dev.to post, backing up a web directory and rotating old archives.</p><pre>#!/bin/bash<br>SOURCE=&quot;/var/www/html&quot;<br>DEST=&quot;/mnt/backup&quot;<br>RETENTION_DAYS=7<br><br># Create dated archive<br>DATE=$(date +%Y-%m-%d)<br>ARCHIVE=&quot;$DEST/site_$DATE.tar.gz&quot;<br><br>tar -czf &quot;$ARCHIVE&quot; &quot;$SOURCE&quot;<br><br># Delete archives older than retention period<br>find &quot;$DEST&quot; -type f -name &quot;site_*.tar.gz&quot; -mtime +$RETENTION_DAYS -exec rm -f {} \;<br><br>echo &quot;Backup completed: $ARCHIVE&quot;</pre><p><em>Result:</em> A new compressed file appears each day, and archives older than a week disappear automatically, keeping disk usage predictable.</p><h3>2. Log Rotation &amp; Cleanup (From the same source)</h3><pre>#!/bin/bash<br>find /var/log -type f -name &quot;*.log&quot; -mtime +7 -exec rm -f {} \;</pre><p><em>Result:</em> Logs older than seven days are removed, preventing uncontrolled growth of /var/log.</p><h3>3. User Provisioning Script</h3><pre>#!/bin/bash<br>USERNAME=$1<br>if [[ -z &quot;$USERNAME&quot; ]]; then<br>  echo &quot;Usage: $0 &lt;username&gt;&quot;<br>  exit 1<br>fi<br><br>useradd -m -s /bin/bash &quot;$USERNAME&quot;<br>echo &quot;$USERNAME:ChangeMe123&quot; | chpasswd<br>passwd --expire &quot;$USERNAME&quot;<br><br>echo &quot;User $USERNAME created and password set to expire.&quot;</pre><p><em>Result:</em> One‑liner to create a user, set a temporary password, and force a password change on first login.</p><h3>Best Practices and Common Mistakes</h3><h3>Naming Conventions and Documentation</h3><p>A frequent mistake is writing cryptic one‑liners without comments. In production scripts, always add a header block that explains purpose, input parameters, and exit codes.</p><pre>#!/bin/bash<br># ------------------------------------------------------------<br># backup_site.sh – Create a dated tarball of the web root.<br># Arguments: None (paths are hard‑coded for simplicity).<br># Exit Codes: 0 on success, 1 on failure.<br># ------------------------------------------------------------</pre><h3>Error Handling and Idempotency</h3><p>Many tutorials skip error checking. A robust script should verify each step before proceeding.</p><pre>set -euo pipefail<br># Verify destination is writable<br>if [[ ! -w &quot;$DEST&quot; ]]; then<br>  echo &quot;Error: Destination $DEST is not writable&quot; &gt;&amp;2<br>  exit 1<br>fi</pre><p><em>💡 Pro Tip: Return explicit exit codes (</em><em>0 for success, non‑zero for failure) so CI pipelines can react appropriately.</em></p><h3>Over‑reliance on sudo</h3><p>Embedding sudo inside scripts makes them harder to run in non‑interactive CI environments. Instead, run the whole script with the required privileges and avoid sudo inside.</p><h3>Advanced Techniques &amp; Tools</h3><h3>Using shellcheck for Linting</h3><p>ShellCheck is a static analysis tool that catches common Bash pitfalls. Integrate it into your CI pipeline:</p><pre># .gitlab-ci.yml example<br>lint_bash:<br>  image: koalaman/shellcheck-alpine<br>  script:<br>    - shellcheck scripts/*.sh</pre><p><em>💡 Pro Tip: Treat </em><em>shellcheck warnings as build failures to enforce quality.</em></p><h3>Parameterizing Scripts with envsubst</h3><p>For environments that differ between staging and production, use environment variable substitution.</p><pre>#!/bin/bash<br>export APP_ENV=staging<br>cat config.tmpl | envsubst &gt; config.yaml</pre><h3>Using Bash in Docker Build Steps</h3><p>Embedding Bash scripts in Dockerfiles can keep images lean. Example from Hari Sekhon’s repo:</p><pre>FROM alpine:3.18<br>COPY scripts/backup.sh /usr/local/bin/backup.sh<br>RUN chmod +x /usr/local/bin/backup.sh<br>ENTRYPOINT [&quot;/usr/local/bin/backup.sh&quot;]</pre><p>When the container starts, the backup runs automatically, eliminating the need for a separate host script.</p><h3>Frequently Asked Questions</h3><h3>What level of Bash knowledge is required for DevOps?</h3><p>A solid grasp of variables, loops, conditionals, and exit codes is enough to start automating daily tasks. Advanced topics like process substitution and trap handling can be learned as needs arise.</p><h3>How does Bash fit into Infrastructure as Code (IaC)?</h3><p>Bash is often used to glue together IaC tools (Terraform, Ansible) by invoking them in sequence, handling secrets, or performing pre‑checks before a plan is applied.</p><h3>Can Bash replace Python for all automation?</h3><p>No. Bash excels at low‑level OS interactions, while Python provides richer libraries for API calls, data processing, and cross‑platform compatibility. Choose the tool that matches the problem complexity.</p><h3>Why do some pipelines still use legacy Bash scripts?</h3><p>Legacy scripts persist because they are fast to write, have no external dependencies, and are well‑understood by operations teams. Refactoring them incrementally is a pragmatic approach.</p><h3>How do I secure Bash scripts that contain credentials?</h3><p>Never hard‑code secrets. Use environment variables, secret managers (HashiCorp Vault, AWS Secrets Manager), or encrypted files accessed at runtime.</p><p>Verdict: Bash remains a vital skill for DevOps engineers. Pair it with linting tools, proper error handling, and clear documentation to create reliable automation that scales with your infrastructure.</p><p>Where to Buy: For deeper learning, consider the <em>Linux Command Line and Shell Scripting</em> book on Amazon, which includes a dedicated chapter on DevOps use‑cases.</p><p>Next Steps: Pick one of the example scripts above, adapt it to your environment, and add it to a cron job or CI pipeline. Monitor its execution for a week, then iterate based on the logs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae15c5a53b65" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Is an AI Agent? A Beginner’s Guide with Real-World Examples]]></title>
            <link>https://medium.com/@subramanya1496/what-is-an-ai-agent-a-beginners-guide-with-real-world-examples-0fec68238041?source=rss-0b71cb358112------2</link>
            <guid isPermaLink="false">https://medium.com/p/0fec68238041</guid>
            <category><![CDATA[ai-automation]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[subramanya goutham]]></dc:creator>
            <pubDate>Sun, 31 May 2026 15:41:06 GMT</pubDate>
            <atom:updated>2026-05-31T15:41:06.741Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*7avCmYHTFk_Nd0TOTrJdFw@2x.jpeg" /></figure><p>Artificial Intelligence (AI) is changing the way we work, communicate, and solve problems. One of the most exciting developments in this field is the rise of AI agents. From virtual assistants like Siri and ChatGPT to advanced business automation tools, AI agents are becoming a major part of our daily lives.</p><p>But what exactly is an AI agent, and why is everyone talking about it?</p><p>In this beginner-friendly guide, we’ll explain what AI agents are, how they work, their different types, benefits, and real-world applications.</p><p>What Is an AI Agent?</p><p>An AI agent is a software system that can perceive its environment, make decisions, and take actions to achieve specific goals with minimal human intervention.</p><p>Unlike traditional software that follows fixed instructions, AI agents can analyze information, learn from data, and adapt their behavior based on changing situations.</p><p>Think of an AI agent as a digital assistant that can:</p><ul><li>Understand tasks</li><li>* Make decisions</li><li>* Perform actions</li><li>* Learn from outcomes</li><li>* Improve over time</li></ul><p>Simple Example of an AI Agent</p><p>Imagine you ask an AI travel assistant:</p><p>“Find the cheapest flight to Dubai next month and book it.”</p><p>An AI agent can:</p><ol><li>Search multiple airline websites.</li><li>2. Compare prices and schedules.</li><li>3. Recommend the best option.</li><li>4. Complete the booking process.</li><li>5. Send you the confirmation details.</li></ol><p>Instead of simply answering questions, the AI agent actively performs tasks on your behalf.</p><p>How Does an AI Agent Work?</p><p>Most AI agents follow four main steps:</p><ol><li>Perception</li></ol><p>The agent collects information from its environment.</p><p>Examples:</p><ul><li>User commands</li><li>* Sensors</li><li>* Databases</li><li>* Websites</li><li>* APIs</li></ul><p>2. Processing</p><p>The AI analyzes the information and understands the context.</p><p>3. Decision Making</p><p>Based on its goals, the agent determines the best action to take.</p><p>4. Action</p><p>The AI executes the selected action and may continue monitoring results.</p><p>Types of AI Agents</p><p>Simple Reflex Agents</p><p>These agents react to specific conditions using predefined rules.</p><p>Example:</p><p>A smart thermostat turns on the cooling system when the temperature exceeds a certain limit.</p><p>Model-Based Agents</p><p>These agents maintain an internal model of the environment and use it to make smarter decisions.</p><p>Example:</p><p>Self-driving cars track nearby vehicles and road conditions.</p><p>Goal-Based Agents</p><p>These agents focus on achieving a particular objective.</p><p>Example:</p><p>A navigation app finding the fastest route to your destination.</p><p>Utility-Based Agents</p><p>These agents evaluate multiple options and select the one that provides the best outcome.</p><p>Example:</p><p>Investment recommendation systems.</p><p>Learning Agents</p><p>These agents improve their performance through experience and data.</p><p>Example:</p><p>ChatGPT and recommendation engines.</p><p>Real-World Examples of AI Agents</p><p>AI agents are already being used across various industries.</p><p>Virtual Assistants</p><ul><li>ChatGPT</li><li>* Siri</li><li>* Google Assistant</li><li>* Alexa</li></ul><p>Customer Support</p><p>AI chatbots can answer questions, resolve issues, and provide 24/7 support.</p><p>E-Commerce</p><p>Online stores use AI agents to recommend products and personalize shopping experiences.</p><p>Healthcare</p><p>AI agents assist doctors by analyzing medical records and suggesting treatments.</p><p>Finance</p><p>Banks use AI agents for fraud detection, risk analysis, and customer service.</p><p>Software Development</p><p>AI coding assistants help developers write, review, and optimize code.</p><p>Benefits of AI Agents</p><p>Increased Productivity</p><p>AI agents automate repetitive tasks and save time.</p><p>Better Decision Making</p><p>They analyze large amounts of data faster than humans.</p><p>24/7 Availability</p><p>AI agents can work continuously without breaks.</p><p>Reduced Costs</p><p>Businesses can automate operations and reduce manual workload.</p><p>Scalability</p><p>AI agents can handle thousands of tasks simultaneously.</p><p>Challenges of AI Agents</p><p>Despite their advantages, AI agents also have limitations.</p><ul><li>Data privacy concerns</li><li>* Security risks</li><li>* Bias in AI models</li><li>* Dependence on quality data</li><li>* Limited understanding in complex situations</li></ul><p>Organizations must implement responsible AI practices to minimize these challenges.</p><p>The Future of AI Agents</p><p>AI agents are expected to become more autonomous, intelligent, and capable of handling complex tasks.</p><p>Future AI agents may:</p><ul><li>Manage entire business workflows</li><li>* Coordinate with other AI agents</li><li>* Perform advanced research</li><li>* Handle personal productivity tasks</li><li>* Assist in scientific discoveries</li></ul><p>As AI technology advances, AI agents will play an increasingly important role in both personal and professional environments.</p><p>Final Thoughts</p><p>AI agents are transforming the way people interact with technology. They go beyond simple automation by understanding goals, making decisions, and taking actions to achieve desired outcomes.</p><p>Whether it’s a virtual assistant, customer support chatbot, or autonomous business system, AI agents are becoming essential tools for improving efficiency and productivity.</p><p>Understanding how AI agents work today can help individuals and businesses prepare for the future of intelligent automation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0fec68238041" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pod vs Container in Kubernetes Explained Simply for Beginners]]></title>
            <link>https://medium.com/@subramanya1496/pod-vs-container-in-kubernetes-explained-simply-for-beginners-578d11ca3cf8?source=rss-0b71cb358112------2</link>
            <guid isPermaLink="false">https://medium.com/p/578d11ca3cf8</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[subramanya goutham]]></dc:creator>
            <pubDate>Mon, 25 May 2026 17:55:19 GMT</pubDate>
            <atom:updated>2026-05-25T17:55:19.502Z</atom:updated>
            <content:encoded><![CDATA[<h3>PPod vs Container in Kubernetes Explained Simply for Beginners</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*suUjKu_05udpqtJ5UTN8Og.png" /></figure><p>Getting confused between Pod and Container?<br>Don’t worry… you are not alone 😅😂</p><p>Even I was confused in the beginning.</p><p>When learning Kubernetes, almost everyone asks:</p><blockquote><em>“Why do we need Pods when we already have Containers?”</em></blockquote><p>So let’s understand this in the simplest way possible.</p><h3>First Understand What a Container Is</h3><p>A <strong>container</strong> is simply an application packed with everything it needs to run.</p><p>For example:</p><ul><li>Python app</li><li>Java app</li><li>Nginx web server</li><li>Database</li></ul><p>A container includes:</p><ul><li>Application code</li><li>Libraries</li><li>Dependencies</li><li>Runtime</li></ul><p>You can think of a container like a <strong>food box</strong> 🍱</p><p>Everything needed for the meal is already packed inside.</p><p>Example:</p><ul><li>One container = One Nginx server</li><li>One container = One Python application</li></ul><h3>Then What Is a Pod?</h3><p>A <strong>Pod</strong> is a wrapper around one or more containers in Kubernetes.</p><p>Kubernetes does not directly manage containers.</p><p>It manages <strong>Pods</strong>.</p><h3>Easiest Real-Life Example</h3><p>Imagine this:</p><ul><li><strong>Container = A single person</strong></li><li><strong>Pod = A house</strong></li></ul><p>A house can have:</p><ul><li>One person</li><li>Or multiple people living together</li></ul><p>Similarly:</p><ul><li>One Pod can contain one container</li><li>Or multiple related containers</li></ul><h3>Another Simple Example</h3><p>Think about a mobile phone 📱</p><p>Inside the phone:</p><ul><li>Battery</li><li>SIM</li><li>Processor</li><li>Apps</li></ul><p>All these components work together.</p><p>Similarly, inside a Pod:</p><ul><li>Main application container</li><li>Logging container</li><li>Monitoring container</li></ul><p>They work together as one unit.</p><h3>Why Kubernetes Uses Pods Instead of Direct Containers</h3><p>Because sometimes applications need helper containers.</p><p>Example:</p><p>A web application may need:</p><ul><li>Main app container</li><li>Log collector container</li><li>Monitoring container</li></ul><p>Kubernetes groups them together inside one Pod.</p><p>This makes:</p><ul><li>Communication easier</li><li>Scaling easier</li><li>Management easier</li></ul><h3>Super Easy Memory Trick 😄</h3><p>Remember this line:</p><blockquote><strong><em>Container runs the application<br> Pod holds the container</em></strong></blockquote><p>Or this:</p><blockquote><strong><em>Container = Worker<br> Pod = Workspace</em></strong></blockquote><h3>Important Thing Beginners Should Know</h3><p>In real-world projects:</p><p>Most Pods usually contain:</p><ul><li>Only ONE container</li></ul><p>Yes 😄</p><p>Even though Pods can run multiple containers, many applications use just one container per Pod.</p><p>Quick Comparison Table</p><pre>| Container                              | Pod                                 |<br>| -------------------------------------- | ----------------------------------- |<br>| Runs application                       | Holds container(s)                  |<br>| Created using Docker/container runtime | Created by Kubernetes               |<br>| Smallest runnable app unit             | Smallest deployable Kubernetes unit |<br>| Can run alone                          | Usually manages containers          |</pre><h3>Final Thoughts</h3><p>If you are learning Kubernetes for the first time, don’t overcomplicate it.</p><p>Just remember:</p><blockquote><strong><em>Container = Application</em></strong></blockquote><blockquote><strong><em>Pod = Box that carries the application in Kubernetes</em></strong></blockquote><p>That’s it 😄</p><p>Once this basic concept becomes clear, Kubernetes starts making much more sense.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=578d11ca3cf8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jenkins Is Not Just for DevOps Engineers — Anyone in Tech Can Use It]]></title>
            <link>https://medium.com/@subramanya1496/jenkins-is-not-just-for-devops-engineers-anyone-in-tech-can-use-it-b823cdfbcef7?source=rss-0b71cb358112------2</link>
            <guid isPermaLink="false">https://medium.com/p/b823cdfbcef7</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[subramanya goutham]]></dc:creator>
            <pubDate>Mon, 25 May 2026 05:36:12 GMT</pubDate>
            <atom:updated>2026-05-25T05:36:12.067Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Jenkins for Everyone: Developers, Testers, Network Engineers, and More" src="https://cdn-images-1.medium.com/max/1024/1*VDE5TRhxDqLIJvSIbGqR8w.png" /></figure><p>Many people think Jenkins is only for DevOps engineers.</p><p>The answer is <strong>No</strong>.</p><p>Jenkins can be used by almost anyone working in IT or software-related fields. If your daily work includes repetitive tasks, Jenkins can help automate them and save a lot of time.</p><h3>What Is Jenkins in Simple Terms?</h3><p>Jenkins is an open-source automation tool used to automate different stages of software development and IT operations.</p><p>In simple words, Jenkins helps you automate repetitive tasks instead of doing them manually every day.</p><p>It is commonly used for:</p><ul><li>Building applications</li><li>Running tests</li><li>Deploying software</li><li>Scheduling jobs</li><li>Monitoring systems</li><li>Taking backups</li><li>Running scripts automatically</li></ul><h3>Why Is Jenkins So Popular?</h3><p>Here are some reasons why Jenkins is widely used:</p><h3>1. Automation</h3><p>Jenkins automates repetitive tasks such as builds, testing, deployments, backups, and scheduled scripts.</p><h3>2. Huge Plugin Support</h3><p>Jenkins has more than 1,800 plugins that integrate with tools like:</p><ul><li>Docker</li><li>Kubernetes</li><li>Selenium</li><li>Git</li></ul><h3>3. Supports Multiple Technologies</h3><p>Jenkins works with many programming languages and technologies including:</p><ul><li>Java</li><li>Python</li><li>JavaScript</li><li>Shell scripting</li><li>Go</li><li>Node.js</li></ul><h3>4. Easy to Use</h3><p>It provides a simple web-based interface where users can create jobs and automate tasks without needing complex setups.</p><h3>5. Distributed Builds</h3><p>Jenkins supports master-agent architecture, allowing builds and jobs to run across multiple machines for better performance.</p><h3>Who Can Use Jenkins Other Than DevOps Engineers?</h3><p>Even though Jenkins is heavily used in DevOps, many other engineers can benefit from it.</p><h3>1. Software Developers</h3><p>Developers can use Jenkins to:</p><ul><li>Compile code automatically</li><li>Run unit tests</li><li>Validate code before merging</li><li>Detect build failures early</li></ul><p>Instead of waiting for release time, developers can test their code separately in Jenkins and reduce issues later.</p><h3>2. Testers and QA Engineers</h3><p>Testers can automate tasks like:</p><ul><li>Installing new builds</li><li>Running automated test cases</li><li>Regression testing</li><li>Generating test reports</li></ul><p>This reduces manual effort and saves time whenever a new software version is released.</p><h3>3. Network Engineers</h3><p>Network engineers can use Jenkins for:</p><ul><li>Switch configuration backups</li><li>Network monitoring</li><li>Running automation scripts</li><li>Scheduled health checks</li><li>Configuration updates</li></ul><p>Jenkins works very well with shell scripts and Python automation.</p><h3>4. System Administrators</h3><p>System admins can automate:</p><ul><li>Server backups</li><li>Log cleanup</li><li>User management tasks</li><li>Patch update scripts</li><li>Disk monitoring</li></ul><h3>5. Data Analysts and Data Engineers</h3><p>Data-related teams can use Jenkins to:</p><ul><li>Schedule ETL jobs</li><li>Run Python scripts automatically</li><li>Generate reports</li><li>Trigger data pipelines</li></ul><h3>6. IT Support Teams</h3><p>IT support engineers can automate:</p><ul><li>Daily health checks</li><li>Restart services automatically</li><li>Collect logs</li><li>Send alert notifications</li></ul><h3>Jenkins Is More Than Just CI/CD</h3><p>Many people only associate Jenkins with CI/CD pipelines.</p><p>But Jenkins is actually a powerful automation platform.</p><p>Think of it like this:</p><blockquote><em>If a task is repetitive, Jenkins can probably automate it.</em></blockquote><p>For example:</p><ul><li>Taking daily backups</li><li>Running scheduled scripts</li><li>Monitoring systems</li><li>Restarting services</li><li>Sending email alerts</li><li>Automating deployments</li><li>Running maintenance jobs</li></ul><h3>Simple Real-World Example</h3><p>Suppose you want to take a backup of a folder every day.</p><p>Normally, many Linux users use cron jobs for this.</p><p>But with Jenkins, you can:</p><ul><li>Create a scheduled job</li><li>Run backup scripts automatically</li><li>Store logs</li><li>Get email notifications if backup fails</li><li>View job history from the web interface</li></ul><p>This makes management much easier, especially for teams.</p><h3>Final Thoughts</h3><p>Jenkins is not only for DevOps engineers.</p><p>It is a powerful automation tool that can help anyone in tech automate repetitive tasks and improve productivity.</p><p>The best part is:</p><ul><li>It is open source</li><li>Free to use</li><li>Beginner friendly</li><li>Supported by a huge community</li><li>Works with almost any technology</li></ul><p>If you start thinking about automating your daily work, Jenkins can become one of the most useful tools in your workflow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b823cdfbcef7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bash Script to Ping All IP Addresses in a Subnet (Linux Network Automation)]]></title>
            <link>https://medium.com/@subramanya1496/bash-script-to-ping-all-ip-addresses-in-a-subnet-linux-network-automation-4b0457c174c5?source=rss-0b71cb358112------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b0457c174c5</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[shell-script]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[subramanya goutham]]></dc:creator>
            <pubDate>Sun, 24 May 2026 04:06:15 GMT</pubDate>
            <atom:updated>2026-05-24T04:06:15.928Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oTwFxaR9pvG4FUmFUXvQwA.png" /><figcaption>Linux Network Automation with Shell Scripting</figcaption></figure><p>In Linux or networking environments, administrators often need to check whether IP addresses are reachable in a network.</p><p>Usually, people use the ping command manually for a single IP address. But if you need to check an entire subnet, doing it one by one takes a lot of time.</p><p>With a simple Bash script, you can automate this process and quickly identify which IP addresses are active or available in the network.</p><p>This is very useful for:</p><ul><li>Network administrators</li><li>Linux administrators</li><li>DevOps engineers</li><li>Home lab setups</li><li>IP availability checks</li></ul><h3>What This Script Does</h3><p>The script:</p><ul><li>Takes a subnet as input</li><li>Pings all IP addresses from .1 to .254</li><li>Shows whether each IP is reachable or not</li><li>Helps identify active devices in the network</li></ul><p>open a file:</p><pre>vi ping.sh<br>#paste the below script</pre><pre>#!/bin/bash<br><br># Check if subnet argument is provided<br>if [ -z &quot;$1&quot; ]; then<br>    echo &quot;Usage: $0 192.168.8&quot;<br>    exit 1<br>fi<br><br>SUBNET=$1<br><br># Ping all IPs from .1 to .254<br>for i in {1..254}<br>do<br>    IP=&quot;${SUBNET}.${i}&quot;<br><br>    ping -c 1 -W 1 &quot;$IP&quot; &gt; /dev/null 2&gt;&amp;1<br><br>    if [ $? -eq 0 ]; then<br>        echo &quot;Ping to $IP successful.&quot;<br>    else<br>        echo &quot;Ping to $IP failed.&quot;<br>    fi<br>done</pre><pre>chmod +x ping.sh</pre><pre>#usage<br>./ping.sh 192.168.8<br><br>#example output<br>Ping to 192.168.8.1 failed.<br>Ping to 192.168.8.2 failed.<br>Ping to 192.168.8.3 successful.</pre><h3>Faster Version Using Background Jobs</h3><p>The previous script works well, but it checks IP addresses one by one. On larger networks, this can take time.</p><p>You can make the script much faster by using background jobs so multiple pings run simultaneously.</p><pre>#!/bin/bash<br><br>if [ -z &quot;$1&quot; ]; then<br>    echo &quot;Usage: $0 192.168.8&quot;<br>    exit 1<br>fi<br><br>SUBNET=$1<br><br>for i in {1..254}<br>do<br>(<br>    IP=&quot;${SUBNET}.${i}&quot;<br><br>    ping -c 1 -W 1 &quot;$IP&quot; &gt; /dev/null 2&gt;&amp;1<br><br>    if [ $? -eq 0 ]; then<br>        echo &quot;Ping to $IP successful.&quot;<br>    else<br>        echo &quot;Ping to $IP failed.&quot;<br>    fi<br>) &amp;<br>done<br><br>wait</pre><h3>Why the Faster Version is Better</h3><p>This version:</p><ul><li>Runs multiple ping requests in parallel</li><li>Scans the subnet much faster</li><li>Saves time in large environments</li><li>Useful for network troubleshooting</li></ul><p>The &amp; symbol runs each ping process in the background, and wait ensures the script finishes only after all background jobs complete.</p><h3>Understanding Important Commands</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/391/1*NExu0cZNBJGkuNV8XYjLSw.png" /><figcaption>purpose of ping commands</figcaption></figure><h3>Real-World Use Cases</h3><p>This script can be useful for:</p><ul><li>Finding active devices in a subnet</li><li>Checking available IP addresses</li><li>Network troubleshooting</li><li>Monitoring lab environments</li><li>Quick internal network scans</li></ul><h3>Important Note</h3><p>Some systems or firewalls may block ICMP ping requests. In such cases, an active device may still appear as unreachable.</p><h3>Final Thoughts</h3><p>Automating repetitive network tasks with Bash scripting can save a lot of time for Linux and network administrators.</p><p>This simple subnet ping script is a good beginner-friendly project to understand:</p><ul><li>Bash scripting</li><li>Loops</li><li>Variables</li><li>Conditional statements</li><li>Background jobs</li><li>Basic network automation</li></ul><p>If you are learning Linux, Networking, or DevOps, scripts like this are a great way to improve your automation skills.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b0457c174c5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>