<?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[Logical Operators in bash script(And, OR, NOT)]]></title><description><![CDATA[<p dir="auto">හරි මම ඔයාලට කියල දෙන්නම් අද කොහොමද BASH Script වලදි Logical expression use කරන්නෙ කියලා..</p>
<pre><code>#!/bin/bash

echo "Enter marks :"#user ගෙන් input එක ඉල්ලන්න
read mark #input එක ගන්න 
 
if [ $mark -ge 80  -a $mark -le 100 ] #enter කරපු mark එක 80ට වඩා වැඩිද(-ge 80) ඒ වගේම (-a) 100ට වඩා අඩුද(-la 100)
then #එහෙමනම් 
	echo "A" #A කියල print කරන්න 
elif [ $mark -ge 60 -a $mark -le 79 ]
then 
	echo "B"
elif [ $mark -ge 40 -a $mark -le 59 ]
then 
	echo "C"
elif [ $mark -ge 20 -a $mark -le 39 ]
then 
	echo "D"
elif [ $mark -ge 10 -a $mark -le 19 ]
then 
	echo "E"
else
	echo "Invalid mark"
fi

</code></pre>
<p dir="auto">:ghost:</p>
<p dir="auto"><img src="/assets/uploads/files/1570683194847-screenshot-2019-10-10-at-10.23.09.png" alt="0_1570683194188_Screenshot 2019-10-10 at 10.23.09.png" class=" img-responsive img-markdown" /></p>
]]></description><link>https://lankadevelopers.lk/topic/406/logical-operators-in-bash-script-and-or-not</link><generator>RSS for Node</generator><lastBuildDate>Sun, 10 May 2026 17:48:18 GMT</lastBuildDate><atom:link href="https://lankadevelopers.lk/topic/406.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 10 Oct 2019 04:53:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Logical Operators in bash script(And, OR, NOT) on Thu, 10 Oct 2019 05:38:34 GMT]]></title><description><![CDATA[<p dir="auto">patta bro</p>
]]></description><link>https://lankadevelopers.lk/post/2367</link><guid isPermaLink="true">https://lankadevelopers.lk/post/2367</guid><dc:creator><![CDATA[Nubelle]]></dc:creator><pubDate>Thu, 10 Oct 2019 05:38:34 GMT</pubDate></item></channel></rss>