{"id":65748,"date":"2021-07-13T04:10:04","date_gmt":"2021-07-13T08:10:04","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/topic-3-example-operator-linux-unix-shell-programming-001\/"},"modified":"2021-07-13T04:10:04","modified_gmt":"2021-07-13T08:10:04","slug":"topic-3-example-operator-linux-unix-shell-programming-001","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=65748","title":{"rendered":"Topic 3: Example : Operator #Linux\/Unix: Shell Programming &#8211; 001"},"content":{"rendered":"<p>bash-3.2$ cat operator6.sh<br \/>\n#!\/bin\/ksh<br \/>\nx=15.38<br \/>\ny=15.72<br \/>\n((z = x + y))<br \/>\necho $z<\/p>\n<p>&nbsp;<\/p>\n<p>bash-3.2$ .\/operator6.sh<br \/>\n30 From: http:\/\/sitestree.com\/?p=12234<br \/> Categories:Linux\/Unix: Shell Programming &#8211; 001<br \/>Tags:<br \/> Post Data:2018-05-08 15:32:42<\/p>\n<p>\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com\/' target='new' rel=\"noopener\">https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\t(Big Data, Cloud, Security, Machine Learning): Courses: <a href='http:\/\/Training.SitesTree.com' target='new' rel=\"noopener\"> http:\/\/Training.SitesTree.com<\/a><br \/>\n\t\tIn Bengali: <a href='http:\/\/Bangla.SaLearningSchool.com' target='new' rel=\"noopener\">http:\/\/Bangla.SaLearningSchool.com<\/a><br \/>\n\t\t<a href='http:\/\/SitesTree.com' target='new' rel=\"noopener\">http:\/\/SitesTree.com<\/a><br \/>\n\t\t8112223 Canada Inc.\/JustEtc: <a href='http:\/\/JustEtc.net' target='new' rel=\"noopener\">http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) <\/a><br \/>\n\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com'> https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\tMedium: <a href='https:\/\/medium.com\/@SayedAhmedCanada' target='new' rel=\"noopener\"> https:\/\/medium.com\/@SayedAhmedCanada <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>bash-3.2$ cat operator6.sh #!\/bin\/ksh x=15.38 y=15.72 ((z = x + y)) echo $z &nbsp; bash-3.2$ .\/operator6.sh 30 From: http:\/\/sitestree.com\/?p=12234 Categories:Linux\/Unix: Shell Programming &#8211; 001Tags: Post Data:2018-05-08 15:32:42 Shop Online: https:\/\/www.ShopForSoul.com\/ (Big Data, Cloud, Security, Machine Learning): Courses: http:\/\/Training.SitesTree.com In Bengali: http:\/\/Bangla.SaLearningSchool.com http:\/\/SitesTree.com 8112223 Canada Inc.\/JustEtc: http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) Shop Online: https:\/\/www.ShopForSoul.com\/ Medium: https:\/\/medium.com\/@SayedAhmedCanada<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1917],"tags":[],"class_list":["post-65748","post","type-post","status-publish","format-standard","hentry","category-fromsitestree-com","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":65722,"url":"http:\/\/bangla.sitestree.com\/?p=65722","url_meta":{"origin":65748,"position":0},"title":"Topic 1: Basic Date Displaying Shell Script #Linux\/Unix: Shell Programming &#8211; 001","author":"Author-Check- Article-or-Video","date":"July 12, 2021","format":false,"excerpt":"bash-3.2$ cat echoscript1.sh #!\/bin\/sh #clear echo \"SCRIPT BEGINS\" echo \"Hello $LOGNAME\" echo echo \"Todays date is: c\" date '+%m\/%d\/%y' echo \"and the current time is: c\" date '+%H:%M:%S%n' echo \"Now a list of the processes in the current shell\" ps echo \"SCRIPT FINISHED!!\" bash-3.2$ .\/echoscript1.sh SCRIPT BEGINS Hello shell Todays\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":65746,"url":"http:\/\/bangla.sitestree.com\/?p=65746","url_meta":{"origin":65748,"position":1},"title":"Topic 3: Example: Simple expr statement in shell scripting #Linux\/Unix: Shell Programming &#8211; 001","author":"Author-Check- Article-or-Video","date":"July 13, 2021","format":false,"excerpt":"bash-3.2$ cat operator5.sh #!\/bin\/ksh num1=10 num2=20 echo $num1 num2=`expr $num1 + 25` echo $num2 num3=`expr $num1 + $num2` echo $num3 num4=`expr $num1 * $num2` echo $num4 num5=`expr $num2 \/ $num1` echo $num5 num6=`expr $num1 % 3` echo $num6 \u00a0 bash-3.2$ .\/operator5.sh 10 35 45 350 3 1 From: http:\/\/sitestree.com\/?p=12232 Categories:Linux\/Unix:\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":65693,"url":"http:\/\/bangla.sitestree.com\/?p=65693","url_meta":{"origin":65748,"position":2},"title":"Example use of case in KSH. Show Today&#8217;s Day Name #Linux\/Unix: Shell Programming &#8211; 001","author":"Author-Check- Article-or-Video","date":"July 11, 2021","format":false,"excerpt":"bash-3.2$ cat ksh_case_example_1.sh #!\/bin\/ksh #show today's day name DAY=`date +%a` #show value of $DAY echo $DAY #based on the value of the DAY variable show the day name in full format case \"$DAY\" in Mon) echo \"Monday\" ;; Tue) echo \"Tuesday\" ;; Wed) echo \"Wednesday\" ;; Thu) echo \"Thursday\" ;;\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":65744,"url":"http:\/\/bangla.sitestree.com\/?p=65744","url_meta":{"origin":65748,"position":3},"title":"Topic 3: Example: Expr statements in Shell Scripts #Linux\/Unix: Shell Programming &#8211; 001","author":"Author-Check- Article-or-Video","date":"July 13, 2021","format":false,"excerpt":"bash-3.2$ cat operator1.sh operator2.sh operator3.sh #!\/bin\/sh num1=5 echo $num1 num2=$num1+10 echo $num2 #!\/bin\/sh num1=5 echo $num1 expr $num1 + 7 expr $num1+7 #space matters for expr echo $num1 #!\/bin\/sh num1=5 expr $num1 * 2 expr \"$num1 * 2\" expr $num1 * 2 From: http:\/\/sitestree.com\/?p=12230 Categories:Linux\/Unix: Shell Programming - 001Tags: Post\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":65687,"url":"http:\/\/bangla.sitestree.com\/?p=65687","url_meta":{"origin":65748,"position":4},"title":"Examples of using variables in a Shell Program #Linux\/Unix: Shell Programming &#8211; 001","author":"Author-Check- Article-or-Video","date":"July 11, 2021","format":false,"excerpt":"#!\/bin\/sh #assign value to a variable and print to the screen NAME=\"Justetc\" echo $NAME #Ask the user to enter a Name echo ################################## echo \"enter name\" #read command is used to take input from the user read X #print the value two times to the screen echo $X echo $X\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":65726,"url":"http:\/\/bangla.sitestree.com\/?p=65726","url_meta":{"origin":65748,"position":5},"title":"Topic 2: Logname, Date Time, Shell Script #Linux\/Unix: Shell Programming &#8211; 001","author":"Author-Check- Article-or-Video","date":"July 12, 2021","format":false,"excerpt":"bash-3.2$ cat firstscript.sh #!\/bin\/sh #clear echo \"SCRIPT BEGINS\" echo \"Hello $LOGNAME!\" echo echo \"Today's date and time: c\" date echo mynum=21 myday=\"Monday\" echo \"The value of mynum is $mynum\" echo \"The value of myday is $myday\" echo echo \"SCRIPT FINISHED!!\" echo bash-3.2$ .\/firstscript.sh SCRIPT BEGINS Hello shell! Today's date and\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/65748","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=65748"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/65748\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=65748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=65748"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=65748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}