<?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 Rohitkarande on Medium]]></title>
        <description><![CDATA[Stories by Rohitkarande on Medium]]></description>
        <link>https://medium.com/@rohitkarande081998?source=rss-3595dd41749f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ITTFJTUGDFLVSBpAXasAzA.png</url>
            <title>Stories by Rohitkarande on Medium</title>
            <link>https://medium.com/@rohitkarande081998?source=rss-3595dd41749f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 14:39:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rohitkarande081998/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[DevOps Zero To Hero #120daysdevops ,Day19]]></title>
            <link>https://medium.com/@rohitkarande081998/devops-zero-to-hero-120daysdevops-day19-684896f443f2?source=rss-3595dd41749f------2</link>
            <guid isPermaLink="false">https://medium.com/p/684896f443f2</guid>
            <category><![CDATA[devops-practice]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Rohitkarande]]></dc:creator>
            <pubDate>Fri, 24 Feb 2023 09:47:14 GMT</pubDate>
            <atom:updated>2023-02-24T09:47:14.142Z</atom:updated>
            <content:encoded><![CDATA[<h3>DevOps Zero To Hero #120daysdevops ,Day19</h3><p>Hello InfoSec writers &amp; readers,</p><p>Welcome to DevOps Zero To Hero #120daysdevops</p><p>#Day19</p><p>This is the 19th day of learning. Today I learn about following topic.</p><p>Git and GitHub<br>It will take 3,4 days to learn all about git and GitHub.</p><p><strong>What is Git?</strong><br>-&gt;Git is popular version control system. Git install and maintained on local system rather than <br> in the cloud.<br>-&gt;It is used for <br> — Traking code changes.<br> — Tracking who made changes.<br> — Coding collaboration.<br> — It manage projects with repositories.<br> — Clone a projects to work on local copy.<br> — Push local updates to the main projects.<br> — Pull the latest version of the project to a local copy.</p><p><strong>Why we need Git?</strong><br> &gt;Over 70% of developers use Git!<br> &gt;Developers can work together from anywhere in the world.<br> &gt;Developers can see the full history of the project.<br> &gt;Developers can revert to earlier versions of a project.</p><p><strong>What is GitHub?</strong><br>-&gt; GitHub is designed as a git repository hosting service. You can share your code with others, and giving them rights to make changes or edits. GitHub is exclusively cloud based.</p><p><strong>Difference between Git and GitHub</strong><br>-&gt;In simples words <br> Git is a version control system that lets you manage and keep track of your source code history.<br> GitHub is cloud based hosting service that lets you manage git repositories.</p><p><strong>Now lets install Git</strong><br>-&gt; We can install git for windows, Linux and mac<br> You can download Git for free from the following official website: <a href="https://git-scm.com/">https://git-scm.com/</a></p><p>We installed git on windows OS<br>First thing we need to check whether it properly installed or not<br>open Git Bash and write command “ git — version”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*3a-jqXs4T25twfAumzv9BQ.png" /></figure><p><strong>Now we have to configure git </strong><br>-&gt; This is important for version control system, as each git commit uses this information:<br> For this write following command<br> “git config user.name “username”<br> “git config user.email “email address”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*_GJsJOd_x8nXpc_2PudgSQ.png" /></figure><p>Use <strong>global </strong>to set username and email for <strong>every repository </strong>in your computer.<br>“git config — — global user.name ‘username’ “</p><p>Now we initialize git<br>-&gt; Once you make folder using command mkdir “foldername” navigated to that folder and you can initialize Git on that folder:<br> “git init”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*aPIi6SrhMc09fQ-dfTgXCA.png" /></figure><p>This is the above things I learn today. I hope this writeup will also help you .</p><p>If I wrote any mistakes in my posts please notify me I will rectify and learn more about 😉!</p><p>You can connect me on <a href="https://www.linkedin.com/in/rohit-karande-b02763202">https://www.linkedin.com/in/rohit-karande-b02763202</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=684896f443f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevOps Zero To Hero #120daysdevops ,Day8]]></title>
            <link>https://medium.com/@rohitkarande081998/devops-zero-to-hero-120daysdevops-day8-c2552db76e7f?source=rss-3595dd41749f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2552db76e7f</guid>
            <category><![CDATA[devops-training]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[linux-tutorial]]></category>
            <category><![CDATA[devops-practice]]></category>
            <dc:creator><![CDATA[Rohitkarande]]></dc:creator>
            <pubDate>Fri, 10 Feb 2023 09:54:06 GMT</pubDate>
            <atom:updated>2023-02-10T09:54:06.211Z</atom:updated>
            <content:encoded><![CDATA[<h3>DevOps Zero To Hero #120daysdevops ,Day8</h3><p>Hello InfoSec writers &amp; readers,</p><p>Welcome to DevOps Zero To Hero #120daysdevops</p><p>#DAY8</p><p>This is the 8th day of learning. Today I learn about following topic.</p><p>Linux Commands</p><p><strong>$sudo</strong><br> -This command operates only that command by root/ superuser privileges.</p><p><strong>$sudo useradd </strong><br> — To add a new user</p><p><strong>$sudo passwd </strong><br> — Creating a password for the new user</p><p><strong>$sudo groupadd </strong><br> — To add a new group</p><p><strong>$sudo userdel </strong><br> — To delete the user</p><p><strong>$sudo groupdel </strong><br> — To delete the group</p><p><strong>$sudo usermod -g </strong><br> — To add a user to a primary group</p><p><strong>$ls</strong><br>This command indexes all the contents in the present working directory.</p><p><strong>$sort</strong><br>This command sorts the outcomes of a search either numerically or alphabetically. It also sorts file contents, files, and directories.</p><p><strong>$grep</strong><br>This command searches for a particular string/ word in a text file. It is similar to “Ctrl+F” but operated through a CLI.<br> grep -n — Returns the matching strings along with their line number</p><p>grep -i — Returns the results for case insensitive strings</p><p>grep -c — Returns the number of lines in which the results matched the search string</p><p>grep -v — Returns the result of lines not matching the search string</p><p><strong>$cat</strong><br>This command could read, alter or concatenate text files. It also shows file contents.</p><p>Syntax:</p><p>cat -n — It adds line numbers to all lines</p><p>cat -b — It adds line numbers to non-blank lines</p><p>cat -s — It squeezes blank lines into one line</p><p>cat –E — It shows $ at the end of line</p><p><strong>$chmod</strong><br>The command is utilized to alter the access authorizations of files and directories.</p><p>Syntax:<br> chmod {filename}</p><p>4 — read permission</p><p>2 — write permission</p><p>1 — execute permission</p><p>0 — no permission</p><p><strong>$telnet</strong><br>Telnet aids to connect to a remote Linux computer and execute programs remotely and operate administration.</p><p><strong>Process Management</strong></p><p>$ps — display your currently active processes</p><p>$top — display all running processes</p><p>$kill pid — kill process id pid</p><p>$killall proc — kill all processes named proc *</p><p>$bg — lists stopped or background jobs; resume a stopped job in the background<br> <br> $fg — brings the most recent job to foreground</p><p>$fg n — brings job n to the foreground</p><p><strong>SSH</strong></p><p>ssh user@host — connect to host as user</p><p>ssh -p port user@host — connect to host on port port as user</p><p>ssh-copy-id user@host — add your key to host for user to enable a keyed or passwordless login.</p><p><strong>System Info</strong></p><p>date — show the current date and time</p><p>cal — show this month’s calendar</p><p>uptime — show current uptime</p><p>w — display who is online</p><p>whoami — who you are logged in as</p><p>finger user — display information about user</p><p>uname -a — show kernel information</p><p>cat /proc/cpuinfo — cpu information</p><p>cat /proc/meminfo — memory information</p><p>man command — show the manual for command</p><p>df — show disk usage</p><p>du — show directory space usage</p><p>free — show memory and swap usage</p><p>whereis app — show possible locations of app</p><p>which app — show which app will be run by default</p><p><strong>Compression</strong></p><p>tar cf file.tar files — create a tar named file.tar containing files</p><p>tar xf file.tar — extract the files from file.tar</p><p>tar czf file.tar.gz files — create a tar with Gzip compression</p><p>tar xzf file.tar.gz — extract a tar using Gzip</p><p>tar cjf file.tar.bz2 — create a tar with Bzip2 compression</p><p>tar xjf file.tar.bz2 — extract a tar using Bzip2</p><p>gzip file — compresses file and renames it to file.gz</p><p>gzip -d file.gz — decompresses file.gz back to file</p><p>This is the above things i learn today. I hope this writeup will also help you to learn bash scripting.</p><p>If I wrote any mistakes in my posts please notify me I will rectify and learn more about 😉!</p><p>You can connect me on <a href="https://www.linkedin.com/in/rohit-karande-b02763202">https://www.linkedin.com/in/rohit-karande-b02763202</a></p><p><strong>Thank YOU…….</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2552db76e7f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevOps Zero To Hero #120daysdevops ,Day7]]></title>
            <link>https://medium.com/@rohitkarande081998/devops-zero-to-hero-120daysdevops-day7-ecfd8f8a51ec?source=rss-3595dd41749f------2</link>
            <guid isPermaLink="false">https://medium.com/p/ecfd8f8a51ec</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[devops-practice]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Rohitkarande]]></dc:creator>
            <pubDate>Thu, 09 Feb 2023 12:25:16 GMT</pubDate>
            <atom:updated>2023-02-09T12:25:16.291Z</atom:updated>
            <content:encoded><![CDATA[<h3>DevOps Zero To Hero #120daysdevops ,Day7</h3><p>Hello InfoSec writers &amp; readers,</p><p>Welcome to DevOps Zero To Hero <strong>#120daysdevops</strong></p><p>#DAY7</p><p>This is the 7th day of learning. Today I learn about following topic</p><p><strong>Linux Filesystem Hierarchy Standard (FHS)</strong></p><p>Filesystem hierarchy standard describes directory structure and its content in Unix and Unix like operating system. It explains where files and directories should be located and what it should contain.</p><p>Only Linux distributions follow the FHS and that too partially. Because every distro have their own policy due to which you may notice some differences in the directory tree structure of different distros.</p><p>If you want to find out information about your system’s FHS, enter the command man hier. It will display directory structure of your system.</p><p>Lets see important Linux directory&#39;s.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*fynhURmwFiY2rqWCqYmxxw.png" /></figure><p><strong>/home</strong><br> The home directory is a subdirectory of the root directory.<br> The home directory contains a particular user’s data.<br> <br><strong>/var</strong><br> We’ll explain some of the /var sub-directories here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m5-ADDkqpOpddTMFyDGy5g.png" /></figure><p><strong>/var/log</strong><br> -The ‘/var/log’ directory contains all log files.</p><p><strong>/var/cache</strong><br> -The ‘/var/cache’ directory stores application cache data.</p><p><strong>/var/spool</strong><br> -The ‘/var/spool’ directory is used to spool the files waiting to be processed.</p><p><strong>/var/lib</strong><br> -The ‘/var/lib’ directory stores the files that contains state information like databases.</p><p><strong>/var/local</strong><br> -The ‘/var/lib’ directory stores the variable data for /usr/local.</p><p><strong>/var/tmp</strong><br> -The ‘/var/tmp’ directory stores the temporary files preserved between system reboots.</p><p><strong>/var/run</strong><br> -The ‘/var/run’ directory stores the data relevant to running processes.<br> <br><strong>/etc</strong><br> The /etc directory is contained in the root directory. It stores storage system configuration files, executables required to boot the system.</p><p><strong>/opt</strong><br> /opt is reserved for the installation of add-on application software packages.<br> A package to be installed in /opt must locate its static files in a separate /opt/&lt;package&gt; or /opt/&lt;provider&gt; directory tree, where &lt;package&gt; is a name that describes the software package.</p><p><strong>/lib</strong><br> The /lib directory contains those shared library images needed to boot the system and run the commands in the root filesystem.</p><p><strong>/root</strong><br> The root account’s home directory may be determined by developer or local preference, but this is the recommended default location.</p><p><strong>/usr</strong><br> The /usr directory is a secondary file hierarchy that contains shareable, read-only data. It includes the following: /usr/bin/ A directory that contains most user commands.</p><p><strong>/bin </strong><br> The ‘/bin’ directory contains user binaries, executable files, Linux commands that are used in single user mode, and common commands that are used by all the users, like cat, cp, cd, ls, etc.<br> The ‘/bin’ directory doesn’t contain directories.</p><p>Non-Standard Directories<br>Directories which do not come under the standard FHS are called non-standard directories.</p><p><strong>Non-standard directories are as follows:</strong></p><p>/cdrom<br>/run<br>/lost + found</p><p><strong>/cdrom</strong><br>The ‘/cdrom’ directory is not in the standard FHS but cdrom can be mounted on this directory. Ideally according to standard FHS cdrom should be mounted under ‘/media’.</p><p><strong>/run</strong><br>The ‘/run’ directory stores run-time variable data. Run-time vriable data means, data about the running system since last boot. For eg, running daemons.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XrgkbxBZXeJxLlgeSxp6ug.png" /></figure><p><strong>/lost + found</strong><br>During system crash or in any other situation when Linux file system checker (fsck) recovers lost data, that data is stored in this directory. Data may or may not be in a good condition.</p><p>This is the above things i learn today. I hope this writeup will also help you to learn bash scripting.</p><p>If I wrote any mistakes in my posts please notify me I will rectify and learn more about 😉!</p><p>You can connect me on <a href="https://www.linkedin.com/in/rohit-karande-b02763202">https://www.linkedin.com/in/rohit-karande-b02763202</a></p><p><strong>Thank YOU…….</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ecfd8f8a51ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevOps Zero To Hero #120daysdevops ,Day6]]></title>
            <link>https://medium.com/@rohitkarande081998/devops-zero-to-hero-120daysdevops-day6-382cedd7beae?source=rss-3595dd41749f------2</link>
            <guid isPermaLink="false">https://medium.com/p/382cedd7beae</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[devops-practice]]></category>
            <category><![CDATA[bash]]></category>
            <dc:creator><![CDATA[Rohitkarande]]></dc:creator>
            <pubDate>Tue, 07 Feb 2023 17:38:24 GMT</pubDate>
            <atom:updated>2023-02-07T17:38:24.168Z</atom:updated>
            <content:encoded><![CDATA[<h3>DevOps Zero To Hero #120daysdevops ,Day6</h3><p>Hello InfoSec writers &amp; readers,</p><p>Welcome to DevOps Zero To Hero <strong>#120daysdevops</strong></p><p>This is the 6th day of learning. Today I learn about following topic</p><p><strong>Bash Array</strong></p><p>An array can be defined as a collection of similar type of elements. Unlike most of the programming languages, arrays in bash scripting need not be the collection of similar elements. Since Bash does not discriminate the string from a number, an array may contain both strings and numbers.</p><p><strong>How to Declare an Array in Bash</strong><br>To declare your array, follow these steps:</p><p>-Give your array a name<br> -Follow that variable name with an equal sign. The equal sign should not have any spaces around it<br> -Enclose the array in parentheses (not brackets like in JavaScript)<br> -Type your strings using quotes, but with no commas between them</p><p><strong>ARRAY_NAME=(element_1st element_2nd element_Nth)</strong></p><p><strong>Access Elements of Bash Array</strong><br>To access the elements of a Bash Array, we can use the following syntax</p><p><strong>echo ${ARRAY_NAME[]}</strong></p><p><strong>Print Bash Array</strong><br>We can use the keyword ‘declare’ with a ‘-p’ option to print all the elements of a Bash Array with all the indexes and details. The syntax to print the Bash Array can be defined as:</p><p><strong>declare -p ARRAY_NAME</strong></p><p>This is the above things i learn today. I hope this writeup will also help you to learn bash scripting.</p><p>If I wrote any mistakes in my posts please notify me I will rectify and learn more about 😉!</p><p>You can connect me on <a href="https://www.linkedin.com/in/rohit-karande-b02763202">https://www.linkedin.com/in/rohit-karande-b02763202</a></p><p><strong>Thank YOU…….</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=382cedd7beae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevOps Zero To Hero #120daysdevops ,Day5]]></title>
            <link>https://medium.com/@rohitkarande081998/devops-zero-to-hero-120daysdevops-day5-7c901ecfc510?source=rss-3595dd41749f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c901ecfc510</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[bash-script]]></category>
            <category><![CDATA[devops-training]]></category>
            <dc:creator><![CDATA[Rohitkarande]]></dc:creator>
            <pubDate>Mon, 06 Feb 2023 19:03:23 GMT</pubDate>
            <atom:updated>2023-02-06T19:03:23.479Z</atom:updated>
            <content:encoded><![CDATA[<h3>DevOps Zero To Hero #120daysdevops ,Day5</h3><p>Hello InfoSec writers &amp; readers,</p><p>Welcome to DevOps Zero To Hero #120daysdevops</p><p>This is the 5th day of learning. Today I learn about following topic</p><p><strong>Bash Function</strong></p><p>Functions in bash scripting are a great option to reuse code. A Bash function can be defined as a set of commands which can be called several times within bash script. The purpose of function in bash is to help you make your scripts more readable and avoid writing the same code again and again. It also allows the developers to break a complicated and lengthy code to small parts which can be called whenever required. Functions can be called anytime and repeatedly, which will enable us to reuse, optimize, and minimize the code.</p><p>Following are some key points about bash functions:</p><p>A function has to be declared in the shell script before we can use it.<br>Arguments can be passed to the functions and accessed inside the function as $1, $2, etc.<br>Local variables can be assigned within the function, and the scope of such variables will only be that particular function.<br>Built-in commands of Bash shell can be overridden using functions.</p><p><strong>Syntax</strong><br> <br><strong>The first method starts with the function name</strong></p><p>function_name () { <br> commands <br> }</p><p><strong>Single line version can be mentioned as below</strong></p><p>function_name () { commands; } <br> <br><strong>The second method starts with the function reserved word, followed by the function name</strong></p><p>function function_name { <br> commands <br> }<br> <br><strong>Single line version can be mentioned as below</strong></p><p>function function_name { commands; }</p><p>Understand the concept with the help of some examples</p><p><strong>Examples 1</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*05JF9wTQ_YfghQvfl9R4yQ.png" /></figure><p><strong>Example 2</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*dr1SRuJ-DgU8xD1vFUlFYg.png" /></figure><p>This is the above things i learn today. I hope this writeup will also help you to learn bash scripting.</p><p>If I wrote any mistakes in my posts please notify me I will rectify and learn more about 😉!</p><p>You can connect me on <a href="https://www.linkedin.com/in/rohit-karande-b02763202">https://www.linkedin.com/in/rohit-karande-b02763202</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c901ecfc510" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevOps Zero To Hero #120daysdevops ,Day4]]></title>
            <link>https://medium.com/@rohitkarande081998/devops-zero-to-hero-120daysdevops-day4-3121c16d489?source=rss-3595dd41749f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3121c16d489</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[bash-script]]></category>
            <category><![CDATA[devops-practice]]></category>
            <dc:creator><![CDATA[Rohitkarande]]></dc:creator>
            <pubDate>Mon, 06 Feb 2023 11:13:51 GMT</pubDate>
            <atom:updated>2023-02-06T11:13:51.152Z</atom:updated>
            <content:encoded><![CDATA[<h3>DevOps Zero To Hero #120daysdevops ,Day4</h3><p>Hello InfoSec writers &amp; readers,</p><p>Welcome to DevOps Zero To Hero #120daysdevops</p><p>This is the 4th day of learning. Today I learn about following topic</p><p><strong>Bash String</strong></p><p>Like other programming languages, Bash String is a data type such as as an integer or floating-point unit. It is used to represent text rather than numbers. It is a combination of a set of characters that may also contain numbers.</p><p>Bash consists of multiple ways to perform string operations and manipulate them.</p><p>Following are some operators in Shell Script used to perform string operations:</p><p><strong>Equal Operator</strong><br>An equal operator (=) is used to check whether two strings are equal.<br><strong> Syntax</strong><br> Operand1 = Operand2</p><p><strong>Not Equal Operator</strong><br>Not equal operator (!=) is used to define that strings are not equal.</p><p><strong>Syntax</strong><br> Operand1 != Operand2</p><p><strong>Less than Operator</strong><br>The ‘less than operator (\&lt;)’ is a conditional operator which is used to check if string1 is less than string2.</p><p><strong>Syntax</strong><br> Operand1 \&lt; Operand2</p><p><strong>Greater than Operator</strong><br>The ‘greater than operator (\&gt;)` is used to check if string1 is greater than string2.</p><p><strong>Syntax</strong><br> Operand1 \&gt; Operand2</p><p><strong>To check if the string length is greater than Zero</strong><br>This operator is used to check if the string is zero or greater than zero.</p><p><strong>Syntax</strong><br> [ -n Operand ]</p><p><strong>To check if the string length is equal to Zero</strong><br>This operator is used to check if the string is empty or equal to zero.</p><p><strong>Syntax</strong><br> [ -z Operand ]</p><p><strong>Bash StringLength</strong><br>To calculate the length of a string, we can use any of the following syntax:</p><p>1) ${#string} <br>2) expr length “$string” <br>3) expr “$string” :’.*’ <br>4) $str | wc -c <br>5) $str |awk ‘{print length}’</p><p><strong>Example</strong></p><p>The simplest way to calculate the length of a string is to use ‘#’ symbol. In this example, we have used $[#string_variable_name} to find the length of a string.</p><p>#!/bin/bash <br> #Bash program to find the length of a string <br> <br> str=”Welcome to Javatpoint” <br> length=${#str} <br> <br> echo “Length of ‘$str’ is $length”</p><p><strong>Output</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*Wv-jEcZWKJt4tXlOx0cavA.png" /><figcaption>Output</figcaption></figure><p><strong>Bash Split String</strong></p><p>Many programming languages have a built-in function named ‘split’ for divide any string data into multiple parts. But there is no built-in function in bash for dividing the string. Normally, single or multiple delimiters are used to split any string data.</p><p>Split using $IFS variable<br>Following are the steps to split a string in bash using $IFS:</p><p>$IFS is a special internal variable which is used to split a string into words. $IFS variable is called ‘Internal Field Separator’ which determines how Bash recognizes boundaries. $IFS is used to assign the specific delimiter [ IFS=’’ ] for dividing the string. The white space is a default value of $IFS. However, we can also use values such as ‘\t’, ‘\n’, ‘-’ etc. as the delimiter.</p><p>After assigning the delimiter, a string can be read by two options: ‘-r’ and ‘-a’. i.e., read -ra ARR &lt;&lt;&lt; “$str”.</p><p>Here, the option ‘-r’ is used to define that backslash (\) is a character rather than escape character. The ‘-a’ option is used to define that the words (separated by $IFS) are assigned to the sequential index of array beginning at zero.</p><p>Then we apply bash ‘for’ loop to access the tokens which are split into an array.</p><p><strong>Bash Substring</strong><br> A substring is a sequence of characters within a string. Bash provides an option to extract the information from a string itself. You can extract the digits or a given string using several methods.<br> <br><strong> Syntax</strong><br>The command for the extraction of substring is a build-in bash command, and so it is very good to use for performance perspective.</p><p>The syntax of the substring extraction can be defined as:</p><p>${variable:offset:length} <br> where,</p><p>Variable is the variable name that contains a string.<br> Offset is used to specify the position from where to start the extraction of a string.<br> Length is used to specify the range of the characters to be executed from the offset.</p><p><strong>Bash Concatenate String</strong><br> In bash scripting, we can add or join two or more strings together, which is known as string concatenation. It is one of the common requirement for any programming language. A special character or built-in function is applied to perform string concatenation. However, Bash does not contain any built-in function to combine string data or variables. The easiest method to perform string concatenation in bash is to write variables side by side.<br><strong> <br>Example</strong></p><p>Write Variables Side by Side<br>This is the basic example of String Concatenation, and we do not need any extra operator or function in this method.</p><p><strong>Bash Script</strong><br> <br> #!/bin/bash<br> #Script to Concatenate Strings</p><p>#Declaring the first String<br> str1=”welcome you”</p><p>#Declaring the Second String<br> str2=” to Bash Scripting.”</p><p>#Combining first and second string<br> str3=”$str1$str2&quot;</p><p>#Printing a new string by combining both<br> echo $str3</p><p><strong>Output</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*Yvn1JbzbmOiWiKUq7guChA.png" /></figure><p>This is the above things i learn today. I hope this writeup will also help you to learn bash scripting.</p><p>If I wrote any mistakes in my posts please notify me I will rectify and learn more about 😉!</p><p>You can connect me on <a href="https://www.linkedin.com/in/rohit-karande-b02763202">https://www.linkedin.com/in/rohit-karande-b02763202</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3121c16d489" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevOps Zero To Hero #120daysdevops ,Day3]]></title>
            <link>https://blog.devops.dev/devops-zero-to-hero-120daysdevops-day3-c1a3c8a48b9d?source=rss-3595dd41749f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1a3c8a48b9d</guid>
            <category><![CDATA[bash-script]]></category>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[zero-to-hero]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[devops-practice]]></category>
            <dc:creator><![CDATA[Rohitkarande]]></dc:creator>
            <pubDate>Fri, 03 Feb 2023 10:46:19 GMT</pubDate>
            <atom:updated>2023-02-09T17:36:05.726Z</atom:updated>
            <content:encoded><![CDATA[<h3>DevOps Zero To Hero #120daysdevops ,Day3</h3><p>Hello InfoSec writers &amp; readers,</p><p>Welcome to DevOps Zero To Hero #120daysdevops</p><p>This is the 3rd day of learning. Today I learn about following topic</p><ul><li><strong>Bash Loops</strong></li></ul><p>Loops allow us to take a series of commands and keep re-running them until a particular situation is reached. They are useful for automating repetitive tasks.<br>There are 3 basic loop structures in Bash scripting which we’ll look at below.<br> 1)Bash For Loop<br> 2)Bash While Loop<br> 3)Bash Until Loop</p><ul><li><strong>Bash For Loop</strong><br> Like any other programming language, bash shell scripting also supports ‘for loops’ to perform repetitive tasks. It helps us to iterate a particular set of statements over a series of words in a string, or elements in an array.</li></ul><p>Lets starts with simple examples<br> Examples -1<br> #!/bin/bash<br> #This is the basic example of for loop</p><p>string=”I Love Bash Scripting”<br> for string in $string<br> do<br> echo $string<br> done</p><p><strong>Output</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*7cSuAO9uCclHDrexG6DKsA.png" /></figure><p>Example -2<br> #! /bin/bash</p><p># Script For Reading Three Expression</p><p>for ((i=1;i&lt;=10;i++))<br> do<br> echo “$i”<br> done</p><p>Output</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*NhVM7fAYerVchD-F6KXDQg.png" /></figure><p>Example -3<br> <br> #!/bin/bash</p><p>#For Loop With Break Statement</p><p>for int in {2..50..2}<br> do<br> echo $int<br> if [ $int == 10 ];<br> then<br> break<br> fi<br> done</p><p>Output</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*ScAA4RxX2Qp5mM-02Anhrg.png" /></figure><ul><li><strong>Bash While Loop</strong><br> The bash while loop can be defined as a control flow statement which allows executing the given set of commands repeatedly as long as the applied condition evaluates to true. For example, we can either run echo command many times or just read a text file line by line and process the result by using while loop in Bash.<br> Syntax of Bash While Loop</li></ul><p>while [ expression ]; <br> do <br> commands; <br> multiple commands; <br> done <br> Bash While Loop Examples</p><p>Examples <br> #!/bin/bash</p><p>#Simple While Loop Example</p><p>read -p “Enter The Starting Number: “ snum<br> read -p “Enter The Ending Number: “ enum</p><p>while [[ $snum -le $enum ]];<br> do<br> echo $snum<br> ((snum++))<br> done</p><p>Output</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*3C8HiyePop5LYahF3SaB3g.png" /></figure><ul><li><strong>Bash Until Loop</strong><br> Bash Until Loop in a bash scripting is used to execute a set of commands repeatedly based on the boolean result of an expression. The set of commands are executed only until the expression evaluates to true. It means that when the expression evaluates to false, a set of commands are executed iteratively. The loop is terminated as soon as the expression evaluates to true for the first time.<br> Syntax<br> until [ expression ]; <br> do <br> command1 <br> command2 <br> . . . <br> . . . . <br> commandN <br> done</li></ul><p>Examples of Bash Until Loop</p><p>#!/bin/bash <br> #Bash Until Loop example with a single condition <br> <br> i=1 <br> until [ $i -gt 10 ] <br> do <br> echo $i <br> ((i++)) <br> done</p><p>Output</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*7wKNCp4NUACM3-JcXXDJug.png" /></figure><p>This is the above things i learn today. I hope this writeup will also help you to learn bash scripting.</p><p>If I wrote any mistakes in my posts please notify me I will rectify and learn more about 😉!</p><p>You can connect me on <a href="https://www.linkedin.com/in/rohit-karande-b02763202">https://www.linkedin.com/in/rohit-karande-b02763202</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1a3c8a48b9d" width="1" height="1" alt=""><hr><p><a href="https://blog.devops.dev/devops-zero-to-hero-120daysdevops-day3-c1a3c8a48b9d">DevOps Zero To Hero #120daysdevops ,Day3</a> was originally published in <a href="https://blog.devops.dev/">DevOps.dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevOps Zero To Hero #120daysdevops ,Day2]]></title>
            <link>https://blog.devops.dev/devops-zero-to-hero-120daysdevops-day2-a708e56b66b9?source=rss-3595dd41749f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a708e56b66b9</guid>
            <category><![CDATA[devops-practice]]></category>
            <category><![CDATA[zero-to-hero]]></category>
            <category><![CDATA[120daysdevops]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Rohitkarande]]></dc:creator>
            <pubDate>Thu, 02 Feb 2023 12:28:21 GMT</pubDate>
            <atom:updated>2023-02-06T19:20:13.110Z</atom:updated>
            <content:encoded><![CDATA[<h3>DevOps Zero To Hero #120daysdevops ,Day2</h3><p>Hello InfoSec writers &amp; readers,</p><p><strong>Welcome to DevOps Zero To Hero #120daysdevops</strong></p><p>This is the 2nd day of learning. Today I learn about following topic</p><p><strong>Conditional Statements</strong><br>- Bash If Statement<br>- Bash If Else<br>- Bash Else If<br>- Bash Case</p><ul><li><strong>Bash If</strong><br>In this topic, we will understand how to use if statements in Bash scripts to get our automated tasks completed.<br>A basic if statement commands that if a particular condition is true, then only execute a given set of actions. If it is not true, then do not execute those actions.</li></ul><p>Learn directly with simple examples.</p><pre>Take a user-input of any number and check if the value is greater than 100.<br> <br>#!/bin/bash <br>read -p “ Enter number : “ number <br>if [ $number -gt 100] <br>then <br>echo “Value is greater than 100” <br>fi</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*jKobpIierqlcqNzgCeqPMQ.png" /><figcaption><strong>Script</strong></figcaption></figure><figure><img alt="Output" src="https://cdn-images-1.medium.com/max/769/1*vndektG0SfCkFtJBjQEZZQ.png" /><figcaption><strong>Output</strong></figcaption></figure><ul><li><strong>Bash If Else</strong><br>In this topic, we will understand how to use if-else statements in Bash scripts to get our automated tasks completed.<br>Bash if-else statements are used to perform conditional tasks in the sequential flow of execution of statements.</li></ul><pre>Example<br>- Following example consists of two different scenarios where in the first if-else statement, the condition is false, and in the second if-else statement, the condition is true.<br> <br>#! /bin/bash<br>#When condition is false<br>if [ 5 == 10 ];<br>then<br> echo “Numbers are Equal”<br>else<br> echo “Numbers are not Equal”<br>fi</pre><pre>#When condition is true<br>if [ 5 == 5 ];<br>then<br> echo “Numbers are Equal”<br>else<br> echo “Numbers are not Equal”<br>fi</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*2IkGTIEJ9xvtQaKwrxfxEw.png" /><figcaption><strong>Script</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*N53xzm_gHtS7HwV3TpI5Jw.png" /><figcaption><strong>Output</strong></figcaption></figure><ul><li><strong>Bash Else If</strong><br>In this topic, we will understand how to use else-if (elif) statements in Bash scripts to get our automated tasks completed.<br>Bash else-if statement is used for multiple conditions. It is just like an addition to Bash if-else statement. In Bash elif, there can be several elif blocks with a boolean expression for each one of them. In the case of the first ‘if statement’, if a condition goes false, then the second ‘if condition’ is checked.</li></ul><p><strong>Example</strong><br>- <strong>Following example consists of three different scenarios take three numbers from user let says A,B,C and check which number is greater and lesser.</strong></p><pre>#! /bin/bash</pre><pre>#For Checking Number is Biggest<br>read -p “Enter the number A =” A<br>read -p “Enter the Number B =” B<br>read -p “Enter the Number c =” C</pre><pre>if [[ $A -gt $B &amp;&amp; $A -gt $C ]]<br>then<br>echo “Number A is Biggest = $A”<br>elif [[ $B -gt $A &amp;&amp; $B -gt $C ]]<br>then<br>echo “Number B is Biggest = $B”<br>elif [[ $C -gt $A &amp;&amp; $C -gt $B ]]<br>then<br>echo “Number C is Biggest = $C”<br>fi</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*aAt2-jgxCeItpCNSc1b_ag.png" /><figcaption>For checking number is biggest</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*XOLe_qmua9mHpcsFClFlGw.png" /><figcaption>Output</figcaption></figure><pre>#For Checking Number is Lesser</pre><pre>read -p “Enter the number A =” A<br>read -p “Enter the Number B =” B<br>read -p “Enter the Number c =” C</pre><pre>if [[ $A -lt $B &amp;&amp; $A -lt $C ]]<br>then<br>echo “Number A is Lesser = $A”<br>elif [[ $B -lt $A &amp;&amp; $B -lt $C ]]<br>then<br>echo “Number B is Lesser = $B”<br>elif [[ $C -lt $A &amp;&amp; $C -lt $B ]]<br>then<br>echo “Number C is Lesser = $C”<br>fi</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*veHjA1nqqDuSiOgXsVuTlg.png" /><figcaption>For checking number is lesser</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*0uQxk_PYVWu8N4qNxHAtVA.png" /><figcaption>Output</figcaption></figure><ul><li><strong>Bash Case statement</strong><br>In this topic, we will discuss the basics of case statements and how to use them in Bash scripts.<br>The Bash case statement is the simplest form of IF-THEN-ELSE with many ELIF elements. Using the case statement makes our bash script more readable and easier to maintain. These are generally applied to simplify the complex conditions having multiple different choices.</li></ul><p><strong>Example</strong><br><strong>In this example, we have defined a simple scenario to demonstrate the use of the case statement.</strong></p><pre>#! /bin/bash<br>echo “Do You Like Bash Scripting?”<br>read -p “Yes/No: “ ANS<br>case $ANS in<br> Yes|yes|Y|y)<br> echo “Great Keep Learning”<br> echo<br> ;;<br> No|no|N|n)<br> echo “Bash Scriptping is very easy Lets Learn together”<br> ;;<br>esac</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*2S0iePHGSudm9Zc5LVq6lw.png" /><figcaption>Script</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*58ckMCwYY9iZXH-15a8T1Q.png" /><figcaption>Output</figcaption></figure><p>This is the above things i learn today. I hope this writeup will also help you to learn bash scripting.</p><p>If I wrote any mistakes in my posts please notify me I will rectify and learn more about 😉!</p><p>You can connect me on <a href="https://www.linkedin.com/in/rohit-karande-b02763202">https://www.linkedin.com/in/rohit-karande-b02763202</a></p><h3>Thank YOU…….</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a708e56b66b9" width="1" height="1" alt=""><hr><p><a href="https://blog.devops.dev/devops-zero-to-hero-120daysdevops-day2-a708e56b66b9">DevOps Zero To Hero #120daysdevops ,Day2</a> was originally published in <a href="https://blog.devops.dev/">DevOps.dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevOps Zero To Hero #120daysdevops ,Day1]]></title>
            <link>https://blog.devops.dev/devops-zero-to-hero-120daysdevops-day1-5ff4f790bbe1?source=rss-3595dd41749f------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ff4f790bbe1</guid>
            <category><![CDATA[zero-to-hero]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[120daysdevops]]></category>
            <dc:creator><![CDATA[Rohitkarande]]></dc:creator>
            <pubDate>Wed, 01 Feb 2023 10:45:45 GMT</pubDate>
            <atom:updated>2023-02-09T17:36:02.355Z</atom:updated>
            <content:encoded><![CDATA[<h3>DevOps Zero To Hero #120daysdevops ,Day1</h3><p>Hello InfoSec writers &amp; readers,</p><p>My name is Rohit Karande currently I am working as Network Security Engineer.</p><p>This is my first writeup , As the title show DevOps Zero To Hero #120daysdevops i am starting to learn new technology DevOps.</p><p>This is the first day of learning , I’ll starts learning from scratch</p><p>Today i learn about following topics</p><p><strong>What is DevOps?</strong><br>DevOps combines development and operations to increase the efficiency, speed, and security of software development and delivery compared to traditional processes.</p><p>A DevOps engineer is an IT professional who has an in-depth understanding of the software development lifecycle</p><figure><img alt="DevOps LifeCycle" src="https://cdn-images-1.medium.com/max/812/1*XFl6bVPml1dX2QsJ4rvqbQ.png" /></figure><p><strong>Why DevOps is important?</strong><br>Today’s DevOps is much more than just automating some tasks or having developers write scripts for their processes. It’s about having a culture and an understanding of how you can improve your business by adopting DevOps practices. The future of DevOps 2023 relies on better communication and more job opportunities.</p><p>It’s also essential for a DevOps Engineer to know the fundamentals of the Linux Command Line Interface (CLI). The mandatory Linux skills that a DevOps engineer should have include: Linux shell — bash</p><p><strong>What is Script?</strong><br>In Computer programming, a script is a set of commands for an appropriate run time environment which is used to automate the execution of tasks.<br><strong>What is Bash Scripting?</strong><br>Bash Scripting is a powerful part of system administration and development used at an extreme level. It is used by the System Administrators, Network Engineers, Developers, Scientists, and everyone who use Linux/Unix operating system. They use Bash for system administration, data crunching, web application deployment, automated backups, creating custom scripts for various pages, etc.</p><p><strong>Filesystem and File permission in bash scripting</strong>.</p><p>What are the three permission groups?<br> There are three options for permission groups available to you in Linux.<br> <strong>Owners</strong>: these permissions will only apply to owners and will not affect other groups.<br> <strong>Groups</strong>: you can assign a group of users specific permissions, which will only impact users within the group.<br> <strong>All users</strong>: these permissions will apply to all users, and as a result, they present the greatest security risk and should be assigned with caution.</p><pre>What are the three kinds of file permissions in Linux?<br> Read (r): Allows a user or group to view a file.<br> Write (w): Permits the user to write or modify a file or directory.<br> Execute (x): A user or grup with execute permissions can execute a file or view a directory. <br> <br>To change directory permissions in Linux, use the following:<br> chmod +rwx filename to add permissions<br> chmod -rwx directoryname to remove permissions. <br> chmod +x filename to allow executable permissions.<br> chmod -wx filename to take out write and executable permissions</pre><pre>Changing directory permissions for group owners and others:<br> The command for changing directory permissions for group owners is similar, but add a “g” for group or “o” for users:<br> chmod g+w filename<br> chmod g-wx filename<br> chmod o+w filename<br> chmod o-rwx foldername</pre><p><strong>Changing ownership:</strong><br> Another helpful command is changing ownerships of files and directories in Linux:<br> chown name filename<br> chown name foldername</p><pre>How to change permissions in numeric code.<br> You may need to know how to change permissions in numeric code in Linux, so to do this you use numbers instead of “r”, “w”, or “x”.<br> 0 = No Permission<br> 1 = Execute<br> 2 = Write<br> 4 = Read<br> Basically, you add up the numbers depending on the level of permission you want to give.<br> Permission numbers are:</pre><pre>0 = — -<br> 1 = — x<br> 2 = -w-<br> 3 = -wx<br> 4 = r-<br> 5 = r-x<br> 6 = rw-<br> 7 = rwx</pre><p>For example:<br> chmod 777 foldername will give read, write, and execute permissions for everyone.<br> chmod 700 foldername will give read, write, and execute permissions for the user only.<br> chmod 327 foldername will give write and execute (3) permission for the user, w (2) for the group, and read, write, and execute for the users.</p><p>This is the above things i learn today. I hope this writeup will also help you to learn bash scripting.</p><p>If I wrote any mistakes in my posts please notify me I will rectify and learn more about 😉!</p><h3>Thank YOU……..</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ff4f790bbe1" width="1" height="1" alt=""><hr><p><a href="https://blog.devops.dev/devops-zero-to-hero-120daysdevops-day1-5ff4f790bbe1">DevOps Zero To Hero #120daysdevops ,Day1</a> was originally published in <a href="https://blog.devops.dev/">DevOps.dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>