<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ibraheem101</title>
    <description>The latest articles on DEV Community by Ibraheem101 (@ibraheem101).</description>
    <link>https://dev.to/ibraheem101</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1100257%2F821c7e30-2c60-4f4a-ab56-f889b52c7d5c.jpeg</url>
      <title>DEV Community: Ibraheem101</title>
      <link>https://dev.to/ibraheem101</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ibraheem101"/>
    <language>en</language>
    <item>
      <title>Conquering the Terminal: An Introduction to Bash Scripting</title>
      <dc:creator>Ibraheem101</dc:creator>
      <pubDate>Sun, 12 May 2024 22:43:42 +0000</pubDate>
      <link>https://dev.to/ibraheem101/conquering-the-terminal-an-introduction-to-bash-scripting-1ap</link>
      <guid>https://dev.to/ibraheem101/conquering-the-terminal-an-introduction-to-bash-scripting-1ap</guid>
      <description>&lt;p&gt;The first encounter I had with the command line was at a relative's house many years ago. I was captivated by the sight of my relative effortlessly typing what seemed like cryptic commands onto a black screen. To me, that was the epitome of what a programmer looked like. Eager to explore this mysterious world, I rushed home and opened up the command prompt. With a mix of excitement and curiosity, I began typing commands that I had memorized, such as &lt;code&gt;cd&lt;/code&gt; and &lt;code&gt;mkdir&lt;/code&gt;, even though I didn't understand their functions at the time. However, these once-unfamiliar commands began to reveal their purpose and significance as I learned more about programming. Now, equipped with a better understanding, I'm thrilled to introduce you to the fascinating world of bash scripting. In this brief tutorial, I'll assume that you're already familiar with basic Linux commands like &lt;code&gt;echo&lt;/code&gt;, &lt;code&gt;ls&lt;/code&gt;, &lt;code&gt;cd&lt;/code&gt;, &lt;code&gt;mkdir&lt;/code&gt;, and &lt;code&gt;nano&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Bash scripting allows you to unlock the true potential of the command line. &lt;br&gt;
Let's break things down. What does bash mean? &lt;br&gt;
Bash stands for Bourne-Again Shell. It is a command line interpreter It executes commands read from a standard input or a file. It's the default shell for most Unix-like operating systems, including Linux and macOS. &lt;br&gt;
Now what does scripting mean? &lt;br&gt;
Scripting is the process of writing and executing scripts using the Bash shell. A script is a series of commands and instructions that are written in a scripting language (in this case, Bash) and executed sequentially.&lt;/p&gt;

&lt;p&gt;Time to create your first script&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open any text editor. Create a file and name it anything with a &lt;code&gt;.sh&lt;/code&gt; extension. For example, &lt;code&gt;myscript.sh&lt;/code&gt;.&lt;br&gt;
I am using Nano text editor. To open a new file on nano, type &lt;code&gt;nano &amp;lt;name of your file&amp;gt;&lt;/code&gt; in your command prompt on your Linux or Mac, or WSL if you are using a Windows computer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The hashbang: The hashbang or the shebang is the first line of a bash script.  It consists of a hash character (&lt;code&gt;#&lt;/code&gt;) followed by an exclamation mark (&lt;code&gt;!&lt;/code&gt;). The shebang is then followed by the path to the interpreter executable. This shebang line tells the system to use the Bash interpreter located at &lt;code&gt;/bin/bash&lt;/code&gt; to execute the script.&lt;br&gt;
In a Bash script, it looks like this:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Note also that a comment in Bash begins with the (&lt;code&gt;#&lt;/code&gt;) symbol&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Basic "Hello World!": To display anything on the command line, we use the echo command.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Hello World!"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Make the script executable: Before we can run this script, we have to grant it execute permission using the &lt;code&gt;chmod&lt;/code&gt; command. Navigate to the directory where the script is stored and run the following:
&lt;code&gt;sudo chmod +x myscript.sh
&lt;/code&gt;
Run &lt;code&gt;ls -l&lt;/code&gt; and we'll see that the color of the file name is now green. Also, &lt;code&gt;rwxr&lt;/code&gt; indicates that the user has read, write and execute rights.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F29wsvjd1brztot8cg2y2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F29wsvjd1brztot8cg2y2.png" alt="Executable and non-executable scripts" width="574" height="122"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run the Script: Navigate to the directory containing your script and execute it using its filename. In your case:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;./myscript.sh&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
This is just a glimpse into the world of bash scripting. As you progress, you will explore variables, arithmetic operations, conditional statements, loops, and functions.&lt;/p&gt;
&lt;h3&gt;
  
  
  Variables
&lt;/h3&gt;

&lt;p&gt;Just like in other programming languages, a variable is a container that stores some data. Variable names in Bash consist of alphanumeric characters and underscores (a-z, A-Z, 0-9, _). They cannot start with a digit. Conventionally, variable names are written in uppercase, but this is not mandatory.&lt;br&gt;
To assign a value to a variable, we use the &lt;code&gt;=&lt;/code&gt; operator with no spaces around it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nv"&gt;myvar&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;23
&lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Ayo"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, let's store "Hello World!" in a variable called &lt;code&gt;myvar&lt;/code&gt; and display it on the screen.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nv"&gt;myvar&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Hello World!"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$myvar&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What's with the dollar(&lt;code&gt;$&lt;/code&gt;) sign? &lt;br&gt;
To access the value stored in a variable, we prefix the variable name with a dollar sign. If you don't do that in the example above, "myvar" will be displayed instead of "Hello World!".&lt;br&gt;
Feel free to try different examples in your text editor.&lt;/p&gt;
&lt;h3&gt;
  
  
  Arithmetic Operations
&lt;/h3&gt;

&lt;p&gt;Arithmetic operations are possible in almost all programming languages and Bash is no different. The table below shows some arithmetic operations and their symbols in Bash.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Operation&lt;/th&gt;
&lt;th&gt;Symbol&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Addition&lt;/td&gt;
&lt;td&gt;&lt;code&gt;+&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Subtraction&lt;/td&gt;
&lt;td&gt;&lt;code&gt;-&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multiplication&lt;/td&gt;
&lt;td&gt;&lt;code&gt;*&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Division&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Modulo (Remainder)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;%&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Exponentiation&lt;/td&gt;
&lt;td&gt;&lt;code&gt;**&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Increment&lt;/td&gt;
&lt;td&gt;&lt;code&gt;++&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Decrement&lt;/td&gt;
&lt;td&gt;&lt;code&gt;--&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;To write a simple math expression, we use the &lt;code&gt;expr&lt;/code&gt; command. For example, 10 + 3 will be written as:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;expr 10 + 3&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
To store the result of an expression in a variable, we can use the double parenthesis: &lt;code&gt;$((...))&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nv"&gt;result&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$((&lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="k"&gt;))&lt;/span&gt;
&lt;span class="nb"&gt;echo &lt;/span&gt;result
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result of the expression &lt;code&gt;10+3&lt;/code&gt; is stored in &lt;code&gt;result&lt;/code&gt; and the result of &lt;code&gt;13&lt;/code&gt; is displayed.&lt;/p&gt;

&lt;p&gt;Arithmetic operations with variables are also possible. Storing your values in variables before performing computation helps improve your code's readability and flexibility. Try the following example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nv"&gt;num1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;100
&lt;span class="nv"&gt;num2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;4
&lt;span class="nv"&gt;result&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$((&lt;/span&gt;&lt;span class="nv"&gt;$num1&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="nv"&gt;$num2&lt;/span&gt;&lt;span class="k"&gt;))&lt;/span&gt;
&lt;span class="c"&gt;# or result=$(expr $num1 % $num2)&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$result&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the example above, we stored 100 and 4 in &lt;code&gt;num1&lt;/code&gt; and &lt;code&gt;num2&lt;/code&gt; respectively. We then performed the modulo operation which returns the remainder when &lt;code&gt;num1&lt;/code&gt; is divided by &lt;code&gt;num2&lt;/code&gt;: 100 % 4 which will give 0.&lt;/p&gt;

&lt;p&gt;So now try this example: 100 divided by 3. Your answer should be 33.333..&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nv"&gt;num1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;100
&lt;span class="nv"&gt;num2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3
&lt;span class="nv"&gt;result&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$((&lt;/span&gt;&lt;span class="nv"&gt;$num1&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nv"&gt;$num2&lt;/span&gt;&lt;span class="k"&gt;))&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$result&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Did you notice that the fraction part of the result was left out? This is because Bash primarily deals with integers. Bash stores numbers as integers and performs calculations with limited precision.&lt;br&gt;
One solution to this is to use the &lt;code&gt;bc&lt;/code&gt; command. Here's the same example you tried but using the &lt;code&gt;bc&lt;/code&gt; command. You might need to install it if you get an error that &lt;code&gt;bc&lt;/code&gt; command is not found. Install it using this command: &lt;code&gt;sudo apt-get install bc&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nv"&gt;num1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;100
&lt;span class="nv"&gt;num2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3
&lt;span class="nv"&gt;result&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"scale:3; &lt;/span&gt;&lt;span class="nv"&gt;$num1&lt;/span&gt;&lt;span class="s2"&gt; / &lt;/span&gt;&lt;span class="nv"&gt;$num2&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | bc&lt;span class="si"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$result&lt;/span&gt;
&lt;span class="c"&gt;# 33.333 will be displayed&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;scale&lt;/code&gt; keyword tells the computer how many numbers you want after the decimal.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bash Conditionals
&lt;/h3&gt;

&lt;p&gt;Bash conditionals are fundamental constructs used for decision-making within Bash scripts. They allow you to execute different sets of commands based on whether certain conditions are true or false. The primary conditional statements in Bash are the &lt;code&gt;if&lt;/code&gt;, &lt;code&gt;elif&lt;/code&gt; (short for "else if"), &lt;code&gt;else&lt;/code&gt;, and &lt;code&gt;fi&lt;/code&gt; (which signifies the end of an if block) statements.&lt;/p&gt;

&lt;p&gt;Before we see how these statements are used, take a look at the table below showing some important &lt;strong&gt;numeric&lt;/strong&gt; comparison operators in Bash scripting. This will be useful later. &lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Operator&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Greater Than&lt;/td&gt;
&lt;td&gt;&lt;code&gt;-gt&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Greater Than or Equal To&lt;/td&gt;
&lt;td&gt;&lt;code&gt;-ge&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Less Than&lt;/td&gt;
&lt;td&gt;&lt;code&gt;-lt&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Less Than or Equal To&lt;/td&gt;
&lt;td&gt;&lt;code&gt;-le&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Equal To&lt;/td&gt;
&lt;td&gt;&lt;code&gt;-eq&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Not Equal To&lt;/td&gt;
&lt;td&gt;&lt;code&gt;-ne&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Now open your text editor and write a script to read a number from a user and check if the number is even or odd. &lt;br&gt;
Haha! We haven't learned how to read user input yet. In bash, we use the &lt;code&gt;read&lt;/code&gt; keyword. To display a prompt, we use the &lt;code&gt;read&lt;/code&gt; keyword with a &lt;code&gt;-p&lt;/code&gt; flag. Here's how it works:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="c"&gt;# Read a number from the user and display it:&lt;/span&gt;
&lt;span class="nb"&gt;read &lt;/span&gt;num
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$num&lt;/span&gt;

&lt;span class="c"&gt;# Prompt the user to enter a number and display it:&lt;/span&gt;
&lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="s2"&gt;"Enter a number: "&lt;/span&gt; num
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$num&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In both cases, the number is stored in the &lt;code&gt;num&lt;/code&gt; variable&lt;/p&gt;

&lt;p&gt;So, going back to your task, we read the number from the user and check if it's even or odd. Then, we print the corresponding message to the user:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="s2"&gt;"Enter first number: "&lt;/span&gt; num

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="k"&gt;$((&lt;/span&gt;&lt;span class="nv"&gt;$num&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="k"&gt;))&lt;/span&gt; &lt;span class="nt"&gt;-eq&lt;/span&gt; 0 &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Even Number"&lt;/span&gt;
&lt;span class="k"&gt;else
&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Odd Number"&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do you understand the code? If you don't, not to worry. Here is a detailed explanation:&lt;br&gt;
&lt;code&gt;read -p "Enter first number: " num&lt;/code&gt;: This prompts the user to enter a number and stores the input in the variable &lt;code&gt;num&lt;/code&gt;.&lt;br&gt;
&lt;code&gt;if [ $(($num % 2)) -eq 0 ]; then&lt;/code&gt;: checks if the remainder of dividing the number by 2 is equal to 0, indicating that the number is even.&lt;br&gt;
&lt;code&gt;echo "Even Number"&lt;/code&gt;: prints "Even Number" if the condition is true.&lt;br&gt;
&lt;code&gt;else&lt;/code&gt;: executes if the condition in the &lt;code&gt;if&lt;/code&gt; statement is false.&lt;br&gt;
&lt;code&gt;echo "Odd Number"&lt;/code&gt;: Prints "Odd Number" if the number is not even.&lt;/p&gt;
&lt;h3&gt;
  
  
  Loops
&lt;/h3&gt;

&lt;p&gt;Just like other languages, loops allow you to execute a block of code multiple times.&lt;br&gt;
Bash provides three primary loop statements; &lt;code&gt;for&lt;/code&gt;, &lt;code&gt;while&lt;/code&gt; and &lt;code&gt;until&lt;/code&gt;. You'll explore the &lt;code&gt;for&lt;/code&gt; and while &lt;code&gt;loops&lt;/code&gt;.&lt;/p&gt;
&lt;h4&gt;
  
  
  The &lt;code&gt;for&lt;/code&gt; loop:
&lt;/h4&gt;

&lt;p&gt;The basic structure of a for loop is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;for &lt;/span&gt;item &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;list&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="c"&gt;# Commands to be executed for each item&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Write a for loop to display all the numbers from 1 to 5.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;i &lt;span class="k"&gt;in &lt;/span&gt;1 2 3 4 5&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$i&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Another way to do it is by using the following format known as brace expansion:&lt;br&gt;
&lt;code&gt;for i in {start..end..step}; do&lt;/code&gt; or just &lt;code&gt;for i in {start..end}; do&lt;/code&gt; if we want to display all the numbers from the start number to the end without any step.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="k"&gt;for &lt;/span&gt;i &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;1..5&lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$i&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In either case, your output should be:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffnsftofzz1dd50k1yok5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffnsftofzz1dd50k1yok5.png" alt="Output" width="623" height="142"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To make your code more efficient, use an array to store the numbers and loop through the array.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nv"&gt;numbers&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;1 2 3 4 5&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;for &lt;/span&gt;i &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;[@]&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$i&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Okay, what's the &lt;code&gt;[@]&lt;/code&gt; used for? &lt;br&gt;
&lt;code&gt;numbers[@]&lt;/code&gt; is used to expand all the elements of the array and the for loop iterates through every element.&lt;/p&gt;

&lt;p&gt;Write a Bash script to print out the ages of a person from 1 to 15, incrementing by 2 years for each age.&lt;br&gt;
You can use the brace expansion method I explained previously:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;for &lt;/span&gt;i &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;1..15..2&lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"I am &lt;/span&gt;&lt;span class="nv"&gt;$i&lt;/span&gt;&lt;span class="s2"&gt; years old"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Another way to do this is by using the double parentheses.&lt;br&gt;
&lt;code&gt;for ((initialization, condition, increment)); do&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="o"&gt;((&lt;/span&gt;&lt;span class="nv"&gt;i&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1&lt;span class="p"&gt;;&lt;/span&gt; i&amp;lt;&lt;span class="o"&gt;=&lt;/span&gt;15&lt;span class="p"&gt;;&lt;/span&gt; i+&lt;span class="o"&gt;=&lt;/span&gt;2&lt;span class="o"&gt;))&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"I am &lt;/span&gt;&lt;span class="nv"&gt;$i&lt;/span&gt;&lt;span class="s2"&gt; years old"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;for ((i=1; i&amp;lt;=15; i+=2))&lt;/code&gt; has the following features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Initialization: &lt;code&gt;i=1&lt;/code&gt; sets the initial value of the counter variable i to 1. &lt;/li&gt;
&lt;li&gt;Condition: &lt;code&gt;i&amp;lt;=15&lt;/code&gt; checks if i is less than or equal to 15. The loop continues as long as this condition is true. &lt;/li&gt;
&lt;li&gt;Increment: &lt;code&gt;i+=2&lt;/code&gt; increments the value of i by 2 in each iteration.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  The &lt;code&gt;while&lt;/code&gt; loop
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;While&lt;/strong&gt; we've conquered iterating through predefined lists using the &lt;code&gt;for&lt;/code&gt; loop 😂, Bash scripting offers another powerful tool for repetitive tasks: the &lt;code&gt;while&lt;/code&gt; loop. Unlike the &lt;code&gt;for&lt;/code&gt; loop, which thrives on a set list of elements, the &lt;code&gt;while&lt;/code&gt; loop keeps executing a block of code as long as a specific condition remains true.&lt;/p&gt;

&lt;p&gt;The format for a while loop is shown below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;while &lt;/span&gt;condition&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
    &lt;span class="c"&gt;# Commands to be executed while the condition is true&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Write a while loop to count down from 10 to 5.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First define a &lt;code&gt;counter&lt;/code&gt; (where you want to begin counting from)&lt;/li&gt;
&lt;li&gt;We want to decrement this &lt;code&gt;counter&lt;/code&gt; by one during every iteration. So tell the computer that as long as &lt;code&gt;counter&lt;/code&gt; is greater than or equal to 5, display its value and then decrement by one.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;counter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;10
&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nv"&gt;$counter&lt;/span&gt; &lt;span class="nt"&gt;-ge&lt;/span&gt; 5 &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Countdown: &lt;/span&gt;&lt;span class="nv"&gt;$counter&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
    &lt;span class="o"&gt;((&lt;/span&gt;counter--&lt;span class="o"&gt;))&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you got it right, this should be your output:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faa90tx8cuwl4i2kavafa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faa90tx8cuwl4i2kavafa.png" alt="Output" width="208" height="174"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Do you have what it takes for the next task?&lt;br&gt;
Write a script to retrieve input from a user until the user enters the string: &lt;code&gt;exit&lt;/code&gt;.&lt;br&gt;
Here's what to do.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create an empty variable that will store the user input.&lt;/li&gt;
&lt;li&gt;Write a while loop with a condition that the string value in the variable is not equal to "exit". &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;do&lt;/code&gt;: read the input from the user.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;done&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;user_input&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;""&lt;/span&gt;
&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$user_input&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="s2"&gt;"exit"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
    &lt;/span&gt;&lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="s2"&gt;"Enter 'exit' to quit: "&lt;/span&gt; user_input
&lt;span class="k"&gt;done

&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Exit Successful"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;So this is what the code does:&lt;br&gt;
&lt;code&gt;user_input=""&lt;/code&gt;: initializes the variable &lt;code&gt;user_input&lt;/code&gt; to an empty string.&lt;br&gt;
&lt;code&gt;while [ "$user_input" != "exit" ]; do&lt;/code&gt;: starts a &lt;code&gt;while&lt;/code&gt; loop that continues as long as the value of &lt;code&gt;user_input&lt;/code&gt; is not "exit".&lt;br&gt;
&lt;code&gt;read -p "Enter 'exit' to quit: " user_input&lt;/code&gt;: prompts the user to enter a value and stores it in the variable &lt;code&gt;user_input&lt;/code&gt;.&lt;br&gt;
&lt;code&gt;echo "Exit Successful"&lt;/code&gt;: Prints "Exit Successful" after the &lt;code&gt;while&lt;/code&gt; loop exits, indicating that the user has entered "exit".&lt;/p&gt;
&lt;h3&gt;
  
  
  Functions
&lt;/h3&gt;

&lt;p&gt;Functions in programming allow you to encapsulate a sequence of commands into a reusable block of code. They improve code readability, maintainability, and reusability by breaking down complex scripts into smaller, more manageable pieces. &lt;br&gt;
As Martin Fowler aptly stated, &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You declare a function in Bash using the &lt;code&gt;function&lt;/code&gt; keyword followed by the function name and parentheses.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;function &lt;/span&gt;my_function&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;# Function commands go here&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Omitting the &lt;code&gt;function&lt;/code&gt; keyword also works&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;my_function&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;# Function commands go here&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To invoke or call a function, you simply use its name&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;my_function&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="c"&gt;# Function commands go here&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# function call&lt;/span&gt;
my_function
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Functions can have arguments. You'll learn a way of passing arguments to bash scripts and functions from the following example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;greet&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Hello &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;, nice to meet you!"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

greet &lt;span class="s2"&gt;"Dan"&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What do we have here? &lt;br&gt;
In this example, the &lt;code&gt;greet()&lt;/code&gt; function takes one argument, &lt;code&gt;$1&lt;/code&gt;, which represents the first argument passed to the function. &lt;code&gt;$2&lt;/code&gt; represents the second, &lt;code&gt;$3&lt;/code&gt; represents the third, and so on.&lt;br&gt;
When the function is called with &lt;code&gt;greet "Dan"&lt;/code&gt;, the string "Dan" is passed as an argument to the function. Inside the function, $1 is replaced with the value "Dan".&lt;/p&gt;

&lt;p&gt;So if you wanted to write a function to pass your name and age as parameters and display them in a string, your function would look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;myself&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Hello I am &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;, I am &lt;/span&gt;&lt;span class="nv"&gt;$2&lt;/span&gt;&lt;span class="s2"&gt; years old"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

myself &lt;span class="s2"&gt;"Fawz"&lt;/span&gt; 26
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;$1&lt;/code&gt; and &lt;code&gt;$2&lt;/code&gt; are replaced by &lt;code&gt;Fawz&lt;/code&gt; and &lt;code&gt;26&lt;/code&gt; respectively.&lt;/p&gt;

&lt;h4&gt;
  
  
  The &lt;code&gt;return&lt;/code&gt; statement
&lt;/h4&gt;

&lt;p&gt;Bash functions do not have explicit return types, but they can return a value using the return statement. The return value is stored in the special variable &lt;code&gt;$?&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Write a function to add two numbers. Use the &lt;code&gt;return&lt;/code&gt; statement to return the result. Remember that you will need to use echo to display the result stored in the &lt;code&gt;$?&lt;/code&gt; variable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;function &lt;/span&gt;add&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nv"&gt;result&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$((&lt;/span&gt; &lt;span class="nv"&gt;$1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nv"&gt;$2&lt;/span&gt; &lt;span class="k"&gt;))&lt;/span&gt;  &lt;span class="c"&gt;# Calculate the sum&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$result&lt;/span&gt;  &lt;span class="c"&gt;# Return the result&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# Call the add function&lt;/span&gt;
add 5 3

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"The sum is: &lt;/span&gt;&lt;span class="nv"&gt;$?&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="c"&gt;# This will display "The sum is: 8"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion and Further Exploration
&lt;/h2&gt;

&lt;p&gt;Congratulations! You've successfully conquered the basics of Bash scripting. You've learned how to navigate the command line, write scripts to automate tasks, and control the flow of your programs using variables, conditionals, and loops. This newfound power opens doors to a vast world of possibilities, from automating repetitive tasks to managing complex system configurations.&lt;/p&gt;

&lt;p&gt;But this is just the beginning of your Bash scripting adventure! You can check out the following resources to fuel your exploration:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Bash Guide:&lt;/strong&gt; The official Bash documentation is a comprehensive resource for everything Bash-related: &lt;a href="https://www.gnu.org/software/bash/manual/" rel="noopener noreferrer"&gt;https://www.gnu.org/software/bash/manual/&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free Bash Scripting handbook:&lt;/strong&gt;  This is an open-source introduction to Bash scripting guide/ebook that will help you learn the basics of Bash scripting:
&lt;a href="https://github.com/bobbyiliev/introduction-to-bash-scripting" rel="noopener noreferrer"&gt;https://github.com/bobbyiliev/introduction-to-bash-scripting&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learn Bash Scripting:&lt;/strong&gt; This online tutorial offers a user-friendly introduction to Bash scripting concepts: &lt;a href="https://github.com/freeCodeCamp/learn-bash-scripting-by-building-five-programs/blob/main/TUTORIAL.md" rel="noopener noreferrer"&gt;https://github.com/freeCodeCamp/learn-bash-scripting-by-building-five-programs/blob/main/TUTORIAL.md&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bash for Beginners:&lt;/strong&gt; This freecodecamp video provides a step-by-step approach to learning Bash scripting: &lt;a href="https://m.youtube.com/watch?v=tK9Oc6AEnR4" rel="noopener noreferrer"&gt;https://m.youtube.com/watch?v=tK9Oc6AEnR4&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Feel free to experiment, explore different scripts, and don't be afraid to make mistakes. The programming community is vast and welcoming, so don't hesitate to seek help online if you get stuck.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Like and Comment!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Did you enjoy conquering the terminal with this tutorial? If you found this introduction to Bash scripting helpful, or if you have any questions or suggestions, leave a comment below! I'd love to hear your thoughts and experiences. &lt;br&gt;
Thank you for reading!&lt;/p&gt;

</description>
      <category>bash</category>
      <category>tutorial</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
