<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>bash on Ohidur's Blog</title><link>https://blog.ohidur.com/tags/bash/</link><description>Recent content in bash on Ohidur's Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>me@ohidur.com (Ohidur Rahman Bappy)</managingEditor><webMaster>me@ohidur.com (Ohidur Rahman Bappy)</webMaster><copyright>©{year} Ohidur.com</copyright><lastBuildDate>Sat, 12 Dec 2020 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.ohidur.com/tags/bash/index.xml" rel="self" type="application/rss+xml"/><item><title>Bash programming reference</title><link>https://blog.ohidur.com/posts/cheatsheet/bash/</link><pubDate>Sat, 12 Dec 2020 00:00:00 +0000</pubDate><author>me@ohidur.com (Ohidur Rahman Bappy)</author><atom:modified>Mon, 08 Mar 2021 14:06:10 +0600</atom:modified><guid>https://blog.ohidur.com/posts/cheatsheet/bash/</guid><description>! /bin/bash ECHO COMMAND echo Hello World! VARIABLES Uppercase by convention Letters, numbers, underscores NAME=&amp;#34;Bob&amp;#34; echo &amp;#34;My name is $NAME&amp;#34; echo &amp;#34;My name is ${NAME}&amp;#34; USER INPUT read -p &amp;#34;Enter your name: &amp;#34; NAME echo &amp;#34;Hello $NAME, nice to meet you!&amp;#34; SIMPLE IF STATEMENT if [ &amp;#34;$NAME&amp;#34; == &amp;#34;Bappy&amp;#34; ] then echo &amp;#34;Your name is Bappy&amp;#34; fi IF-ELSE if [ &amp;#34;$NAME&amp;#34; == &amp;#34;Bappy&amp;#34; ] then echo &amp;#34;Your name is Bappy&amp;#34; else echo &amp;#34;Your name is NOT Bappy&amp;#34; fi ELSE-IF (elif) if [ &amp;#34;$NAME&amp;#34; == &amp;#34;Bappy&amp;#34; ] then echo &amp;#34;Your name is Bappy&amp;#34; elif [ &amp;#34;$NAME&amp;#34; == &amp;#34;Jack&amp;#34; ] then echo &amp;#34;Your name is Jack&amp;#34; else echo &amp;#34;Your name is NOT Bappy or Jack&amp;#34; fi COMPARISON NUM1=31 NUM2=5 if [ &amp;#34;$NUM1&amp;#34; -gt &amp;#34;$NUM2&amp;#34; ] then echo &amp;#34;$NUM1is greater than $NUM2&amp;#34; else echo &amp;#34;$NUM1is less than $NUM2&amp;#34; fi ####### val1 -eq val2 Returns true if the values are equal val1 -ne val2 Returns true if the values are not equal val1 -gt val2 Returns true if val1 is greater than val2 val1 -ge val2 Returns true if val1 is greater than or equal to val2 val1 -lt val2 Returns true if val1 is less than val2 val1 -le val2 Returns true if val1 is less than or equal to val2 ####### FILE CONDITIONS FILE=&amp;#34;test.</description><dc:creator>Ohidur Rahman Bappy</dc:creator><category>bash</category><category>programming</category></item><item><title>ssh reference</title><link>https://blog.ohidur.com/posts/cheatsheet/ssh/</link><pubDate>Sat, 12 Dec 2020 00:00:00 +0000</pubDate><author>me@ohidur.com (Ohidur Rahman Bappy)</author><atom:modified>Mon, 08 Mar 2021 14:06:10 +0600</atom:modified><guid>https://blog.ohidur.com/posts/cheatsheet/ssh/</guid><description>SSH Cheat Sheet Login via SSH with password (LOCAL SERVER) $ ssh brad@192.168.1.29
Create folder, file, install Apache (Just messing around) $ mkdir test
$ cd test
$ touch hello.txt
$ sudo apt-get install apache2
Generate Keys (Local Machine) $ ssh-keygen
Add Key to server in one command &amp;gt; cat ~/.ssh/id_rsa.pub | ssh brad@192.168.1.29 &amp;quot;mkdir -p ~/.ssh &amp;amp;&amp;amp; chmod 700 ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys
Create &amp;amp; copy a file to the server using SCP $ touch test.</description><dc:creator>Ohidur Rahman Bappy</dc:creator><category>bash</category></item></channel></rss>