<?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"><channel><title><![CDATA[My first-shell-script]]></title><description><![CDATA[My first-shell-script]]></description><link>https://my-first-shell-script.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Tue, 01 Sep 2026 01:47:44 GMT</lastBuildDate><atom:link href="https://my-first-shell-script.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[My First Linux Shell Script – A Small Step into DevOps]]></title><description><![CDATA[When preparing for a DevOps role, I realized that strong fundamentals matter more than jumping directly into tools.So I started with Linux shell scripting.
This post documents my first shell script, what it does, and what I learned from it.

📌 Objec...]]></description><link>https://my-first-shell-script.hashnode.dev/my-first-linux-shell-script-a-small-step-into-devops</link><guid isPermaLink="true">https://my-first-shell-script.hashnode.dev/my-first-linux-shell-script-a-small-step-into-devops</guid><category><![CDATA[Devops articles]]></category><dc:creator><![CDATA[Rakesh  Kumar M]]></dc:creator><pubDate>Fri, 13 Feb 2026 08:45:20 GMT</pubDate><content:encoded><![CDATA[<p>When preparing for a <strong>DevOps role</strong>, I realized that strong fundamentals matter more than jumping directly into tools.<br />So I started with <strong>Linux shell scripting</strong>.</p>
<p>This post documents my <strong>first shell script</strong>, what it does, and what I learned from it.</p>
<hr />
<h2 id="heading-objective-of-the-script">📌 Objective of the Script</h2>
<p>The goal of this script is simple:</p>
<ul>
<li><p>Create a directory</p>
</li>
<li><p>Create files inside that directory</p>
</li>
<li><p>Execute the script using proper permissions</p>
</li>
</ul>
<p>This helped me understand <strong>how scripts run in Linux</strong> and how automation begins at a very basic level.</p>
<hr />
<h2 id="heading-the-shell-script">📝 The Shell Script</h2>
<pre><code class="lang-plaintext">#!/bin/bash

#create a directory
mkdir Folder2

#creat a file inside a folder
touch Folder2/file1
touch Folder2/file2
</code></pre>
<hr />
<h2 id="heading-how-i-executed-the-script">▶️ How I Executed the Script</h2>
<ol>
<li>Gave execute permission:</li>
</ol>
<pre><code class="lang-plaintext">chmod +x first-shell-script.sh
</code></pre>
<ol start="2">
<li>Ran the script:</li>
</ol>
<pre><code class="lang-plaintext">./first-shell-script.sh
</code></pre>
<ol start="3">
<li>Verified the output:</li>
</ol>
<pre><code class="lang-plaintext">ls Folder2
</code></pre>
<p>Output:</p>
<pre><code class="lang-plaintext">file1  file2
</code></pre>
<hr />
<h2 id="heading-what-i-learned-from-this">🧠 What I Learned from This</h2>
<p>Even though this is a small script, it helped me understand several important Linux concepts:</p>
<ul>
<li><p>How the <strong>shebang (</strong><code>#!/bin/bash</code>) works</p>
</li>
<li><p>Why <strong>execute permission</strong> is required for scripts</p>
</li>
<li><p>How Linux handles <strong>directory and file creation</strong></p>
</li>
<li><p>How automation starts with small, repeatable tasks</p>
</li>
</ul>
<p>This also reinforced the idea that <strong>Linux is strict</strong>, predictable, and powerful when used correctly.</p>
<hr />
<h2 id="heading-why-this-matters-for-devops">🔍 Why This Matters for DevOps</h2>
<p>DevOps is not just about tools like Docker, Kubernetes, or CI/CD pipelines.<br />It starts with:</p>
<ul>
<li><p>Understanding Linux</p>
</li>
<li><p>Writing scripts</p>
</li>
<li><p>Automating repetitive tasks</p>
</li>
<li><p>Knowing how systems behave</p>
</li>
</ul>
<p>This small script is my <strong>first step toward that journey</strong>.</p>
]]></content:encoded></item></channel></rss>