<?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[DECISION MAKING IN SHELL SCRIPTS(Write a shell script to determine whether a given number is either positive or negative)]]></title><description><![CDATA[<p dir="auto"><strong>මම අද ඔයාලට කියල දෙන්නෙ කොහොමද shell scripting පාවිච්චි කරල DECISION MAKING simple programme එකක් ලියන්නෙ කියල.</strong>:male-technologist:</p>
<p dir="auto">මේ link වලින් ගිහින් ඔයාලට bash script ගැන කලින් කරපු post බලාගන්න පුලුවන්..</p>
<p dir="auto">Lets talk about bash script - <a href="https://lankadevelopers.com/topic/371/lets-talk-about-bash-script" target="_blank" rel="noopener noreferrer nofollow ugc">https://lankadevelopers.com/topic/371/lets-talk-about-bash-script</a></p>
<p dir="auto">First bash script - <a href="https://lankadevelopers.com/topic/372/first-bash-script" target="_blank" rel="noopener noreferrer nofollow ugc">https://lankadevelopers.com/topic/372/first-bash-script</a></p>
<p dir="auto">Sum of two numbers in bash script - <a href="https://lankadevelopers.com/topic/377/sum-of-two-numbers-in-bash-script" target="_blank" rel="noopener noreferrer nofollow ugc">https://lankadevelopers.com/topic/377/sum-of-two-numbers-in-bash-script</a></p>
<p dir="auto">Bash script Array introduction - <a href="https://lankadevelopers.com/topic/386/bash-script-array-introduction" target="_blank" rel="noopener noreferrer nofollow ugc">https://lankadevelopers.com/topic/386/bash-script-array-introduction</a></p>
<p dir="auto"><strong>ඔයාලට කියල දුන්න විදියට .sh File එකක් හදාගන්න.  දැන් ඔයාලා මෙන්න මේ code එක ඔයාලගෙ script එකේ ලියන්න.</strong></p>
<pre><code>#!/bin/bash

echo "Enter mark :" 
read number #ඔයාගේ mark එක read කරනව 

if [ $number -lt 0 ]# මේ කියන්නෙ enter කරපු mark එක less than(අඩුයිනම්) 0 ට වඩා
then #එහෙනම්
	echo "Negetive" #negative කියල print කරන්න

elif [ $number -gt 0 ] # මේ කියන්නෙ enter කරපු mark එක greater than(වැඩියිනම්) 0 ට වඩා
then #එහෙනම්
	echo "Positive"  #Positive කියල print කරන්න

else #ඒ දෙකම නෙමෙයිනම් 
	echo "Neither Positive nor negative" 
fi

</code></pre>
<p dir="auto">:relaxed:<br />
<img src="/assets/uploads/files/1570151874705-screen-shot-2019-10-04-at-6.47.49-am.png" alt="0_1570151873514_Screen Shot 2019-10-04 at 6.47.49 AM.png" class=" img-responsive img-markdown" /></p>
]]></description><link>https://lankadevelopers.lk/topic/398/decision-making-in-shell-scripts-write-a-shell-script-to-determine-whether-a-given-number-is-either-positive-or-negative</link><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Nov 2026 11:26:32 GMT</lastBuildDate><atom:link href="https://lankadevelopers.lk/topic/398.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 04 Oct 2019 01:18:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to DECISION MAKING IN SHELL SCRIPTS(Write a shell script to determine whether a given number is either positive or negative) on Sun, 06 Oct 2019 16:24:34 GMT]]></title><description><![CDATA[<p dir="auto">thanks bro</p>
]]></description><link>https://lankadevelopers.lk/post/2342</link><guid isPermaLink="true">https://lankadevelopers.lk/post/2342</guid><dc:creator><![CDATA[dev_lak]]></dc:creator><pubDate>Sun, 06 Oct 2019 16:24:34 GMT</pubDate></item><item><title><![CDATA[Reply to DECISION MAKING IN SHELL SCRIPTS(Write a shell script to determine whether a given number is either positive or negative) on Sat, 05 Oct 2019 19:38:55 GMT]]></title><description><![CDATA[<p dir="auto">patta brother</p>
]]></description><link>https://lankadevelopers.lk/post/2337</link><guid isPermaLink="true">https://lankadevelopers.lk/post/2337</guid><dc:creator><![CDATA[Nubelle]]></dc:creator><pubDate>Sat, 05 Oct 2019 19:38:55 GMT</pubDate></item><item><title><![CDATA[Reply to DECISION MAKING IN SHELL SCRIPTS(Write a shell script to determine whether a given number is either positive or negative) on Fri, 04 Oct 2019 07:23:28 GMT]]></title><description><![CDATA[<p dir="auto">Fatta bro</p>
]]></description><link>https://lankadevelopers.lk/post/2333</link><guid isPermaLink="true">https://lankadevelopers.lk/post/2333</guid><dc:creator><![CDATA[root]]></dc:creator><pubDate>Fri, 04 Oct 2019 07:23:28 GMT</pubDate></item></channel></rss>