{"id":65744,"date":"2021-07-13T04:10:04","date_gmt":"2021-07-13T08:10:04","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/topic-3-example-expr-statements-in-shell-scripts-linux-unix-shell-programming-001\/"},"modified":"2021-07-13T04:10:04","modified_gmt":"2021-07-13T08:10:04","slug":"topic-3-example-expr-statements-in-shell-scripts-linux-unix-shell-programming-001","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=65744","title":{"rendered":"Topic 3: Example: Expr statements in Shell Scripts #Linux\/Unix: Shell Programming &#8211; 001"},"content":{"rendered":"<p>bash-3.2$ cat operator1.sh operator2.sh operator3.sh<br \/>\n#!\/bin\/sh<br \/>\nnum1=5<br \/>\necho $num1<br \/>\nnum2=$num1+10<br \/>\necho $num2<br \/>\n#!\/bin\/sh<br \/>\nnum1=5<br \/>\necho $num1<br \/>\nexpr $num1 + 7<br \/>\nexpr $num1+7 #space matters for expr<br \/>\necho $num1<\/p>\n<p>#!\/bin\/sh<br \/>\nnum1=5<br \/>\nexpr $num1 * 2<br \/>\nexpr &#8220;$num1 * 2&#8221;<br \/>\nexpr $num1 * 2 From: http:\/\/sitestree.com\/?p=12230<br \/> Categories:Linux\/Unix: Shell Programming &#8211; 001<br \/>Tags:<br \/> Post Data:2018-05-06 14:40:30<\/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 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 &#8220;$num1 * 2&#8221; expr $num1 * 2 From: http:\/\/sitestree.com\/?p=12230 Categories:Linux\/Unix: Shell Programming &#8211; 001Tags: Post Data:2018-05-06 14:40:30 Shop Online: https:\/\/www.ShopForSoul.com\/ &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=65744\">Continue reading<\/a><\/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-65744","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":65746,"url":"http:\/\/bangla.sitestree.com\/?p=65746","url_meta":{"origin":65744,"position":0},"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":65689,"url":"http:\/\/bangla.sitestree.com\/?p=65689","url_meta":{"origin":65744,"position":1},"title":"Arithmetic Operations using two variables #Linux\/Unix: Shell Programming &#8211; 001","author":"Author-Check- Article-or-Video","date":"July 11, 2021","format":false,"excerpt":"#!\/bin\/sh #will do addition, subtraction, multiplication, and division of two variables X=12 Y=5 #print the values of the variables echo \"X value is: \"$X echo \"Y value is: \"$Y #addition echo \"X + Y\" = `expr $X + $Y` #subtraction echo \"Y - X\" = `expr $Y - $X` #multiplication\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":8335,"url":"http:\/\/bangla.sitestree.com\/?p=8335","url_meta":{"origin":65744,"position":2},"title":"(In Bengali) C &#8211; Functions","author":"Author-Check- Article-or-Video","date":"April 3, 2015","format":false,"excerpt":"\u0986\u099c\u0995\u09c7 \u0986\u09ae\u09b0\u09be \u098f\u0987 \u099f\u09bf\u099f\u09cb\u09b0\u09bf\u09df\u09be\u09b2\u09c7 \u09ab\u09be\u0982\u09b6\u09a8\u09c7\u09b0 \u09b8\u0999\u09cd\u0997\u09be \u098f\u09ac\u0982 \u09ab\u09be\u0982\u09b6\u09a8\u0995\u09c7 \u0995\u09bf\u09ad\u09be\u09ac\u09c7 \u09b8\u09cd\u09ac\u09c0\u0995\u09c3\u09a4\u09bf \u09a6\u09c7\u09df\u09be \u09b9\u09df \u09a4\u09be \u09a8\u09bf\u09df\u09c7 \u0986\u09b2\u09cb\u099a\u09a8\u09be \u0995\u09b0\u09ac\u0964 \u0986\u09aa\u09a8\u09be\u09a6\u09c7\u09b0 \u0986\u0997\u09c7\u09b0 \u099f\u09bf\u0989\u099f\u09cb\u09b0\u09bf\u09df\u09be\u09b2\u09c7 \u09ac\u09b2\u099b\u09bf\u09b2\u09be\u09ae \u09b8\u09bf \u09aa\u09cd\u09b0\u0997\u09cd\u09b0\u09be\u09ae\u09bf\u0982 \u09b6\u09bf\u0996\u09a4\u09c7 \u0986\u09aa\u09a8\u09be\u0995\u09c7 \u0995\u09bf\u099b\u09c1\u099f\u09be \u09b9\u09b2\u09c7\u0993 \u0987\u0982\u09b0\u09c7\u099c\u09bf \u09b6\u09bf\u0996\u09a4\u09c7 \u09b9\u09ac\u09c7\u0964 \u09a8\u09bf\u099a\u09c7 \u0986\u09ae\u09b0\u09be \u0995\u09bf\u099b\u09c1 \u0995\u09bf\u099b\u09c1 \u0987\u0982\u09b0\u09c7\u099c\u09c0 \u09b6\u09ac\u09cd\u09a6 \u09aa\u09b0\u09bf\u09ac\u09b0\u09a4\u09ae \u0995\u09b0\u09bf \u09a8\u09be\u0987 \u0995\u09be\u09b0\u09a8 \u09a4\u09be \u0987\u0982\u09b0\u09c7\u099c\u09c0 \u09a5\u09c7\u0995\u09c7 \u09ac\u09be\u0982\u09b2\u09be\u09df \u09aa\u09cd\u09b0\u09ac\u09c7\u09b6 \u0995\u09b0\u09c7\u099b\u09c7\u0964 \u0986\u09b8\u09c1\u09a8 \u099c\u09c7\u09a8\u09c7 \u09a8\u09c7\u0987 \u0995\u09bf\u09ad\u09be\u09ac\u09c7 \u0986\u09ae\u09b0\u09be\u2026","rel":"","context":"In &quot;Root&quot;","block_context":{"text":"Root","link":"http:\/\/bangla.sitestree.com\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5997,"url":"http:\/\/bangla.sitestree.com\/?p=5997","url_meta":{"origin":65744,"position":3},"title":"\u09aa\u09bf\u098f\u0987\u099a\u09aa\u09bf \u09eb \u09ad\u09c7\u09b0\u09bf\u09df\u09c7\u09ac\u09b2 (PHP 5 Variables)","author":"Author-Check- Article-or-Video","date":"March 18, 2015","format":false,"excerpt":"\u0986\u0995\u09cd\u09a4\u09be\u09b0\u09c1\u099c\u09cd\u099c\u09be\u09ae\u09be\u09a8 Department of CSE,University of Chittagong. \u00a0 \u09ad\u09c7\u09b0\u09bf\u09df\u09c7\u09ac\u09b2 \u09b9\u099a\u09cd\u099b\u09c7 \u098f\u0995\u099f\u09bf \u09b8\u09cd\u099f\u09cb\u09b0\u09c7\u099c \u098f\u09b0\u09bf\u09df\u09be \u0964 \u098f\u0987\u099f\u09bf\u0995\u09c7 \u0995\u09ae\u09aa\u09bf\u0989\u099f\u09be\u09b0\u09c7\u09b0 \u09a1\u09be\u099f\u09be \u099c\u09ae\u09be \u09b0\u09be\u0996\u09be\u09b0 \u098f\u0995\u099f\u09bf \u0985\u09b8\u09cd\u09a5\u09be\u09df\u09c0 \u09ac\u0995\u09cd\u09b8\u09c7\u09b0 \u09ae\u09a4 \u0995\u09b2\u09cd\u09aa\u09a8\u09be \u0995\u09b0\u09be \u09af\u09be\u09df\u0964 \u09aa\u09bf\u098f\u0987\u099a\u09aa\u09bf \u09a4\u09c7 \u09ad\u09c7\u09b0\u09bf\u09af\u09bc\u09c7\u09ac\u09b2\u0995\u09c7 \u09a1\u09b2\u09be\u09b0 \u099a\u09bf\u09b9\u09cd\u09a8 \u098f\u09ac\u0982 \u098f\u09b0 \u09aa\u09b0\u09c7 \u09ad\u09c7\u09b0\u09bf\u09df\u09c7\u09ac\u09b2\u09c7\u09b0 \u09a8\u09be\u09ae \u09a6\u09cd\u09ac\u09be\u09b0\u09be \u09aa\u09cd\u09b0\u09a6\u09b0\u09cd\u09b6\u09a8 \u0995\u09b0\u09be \u09b9\u09df\u0964 \u09a8\u09bf\u099a\u09c7 \u098f\u0995\u099f\u09bf \u0989\u09a6\u09be\u09b9\u09b0\u09a3 \u09a6\u09bf\u09df\u09c7 \u09ac\u09bf\u09b7\u09df\u099f\u09bf \u09ac\u09cb\u099c\u09be\u09a8\u09cb \u09b9\u09df\u09c7\u099b\u09c7\u0964 < ?php $text =\u2026","rel":"","context":"In &quot;\u09aa\u09bf \u098f\u0987\u099a \u09aa\u09bf \u099f\u09bf\u0989\u099f\u09cb\u09b0\u09bf\u09df\u09be\u09b2 \u0964 PHP tutorial&quot;","block_context":{"text":"\u09aa\u09bf \u098f\u0987\u099a \u09aa\u09bf \u099f\u09bf\u0989\u099f\u09cb\u09b0\u09bf\u09df\u09be\u09b2 \u0964 PHP tutorial","link":"http:\/\/bangla.sitestree.com\/?cat=172"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14141,"url":"http:\/\/bangla.sitestree.com\/?p=14141","url_meta":{"origin":65744,"position":4},"title":"\u098f\u09b0\u09bf\u09a5\u09ae\u09c7\u099f\u09bf\u0995 \u0985\u09aa\u09be\u09b0\u09c7\u09b6\u09a8 \u09a6\u09c1\u099f\u09bf \u09ad\u09c7\u09b0\u09bf\u09af\u09bc\u09c7\u09ac\u09b2 \u09ac\u09cd\u09af\u09ac\u09b9\u09be\u09b0 \u0995\u09b0\u09c7","author":"Sayed","date":"April 15, 2018","format":false,"excerpt":"#!\/bin\/sh #will do addition, subtraction, multiplication, and division of two variables X=12 Y=5 #print the values of the variables echo \"X value is: \"$X echo \"Y value is: \"$Y #addition echo \"X + Y\" = `expr $X + $Y` #subtraction echo \"Y - X\" = `expr $Y - $X` #multiplication\u2026","rel":"","context":"In &quot;\u09b6\u09c7\u09b2 \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae\u09bf\u0982 - Shell Programming&quot;","block_context":{"text":"\u09b6\u09c7\u09b2 \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae\u09bf\u0982 - Shell Programming","link":"http:\/\/bangla.sitestree.com\/?cat=1888"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9637,"url":"http:\/\/bangla.sitestree.com\/?p=9637","url_meta":{"origin":65744,"position":5},"title":"\u0987\u0989\u09a8\u09bf\u0995\u09cd\u09b8\u0983 \u09b8\u09c7\u09b2 \u09b2\u09c1\u09aa \u0995\u09a8\u09cd\u099f\u09cd\u09b0\u09cb\u09b2 (Unix &#8211; Shell Loop Control)","author":"Author-Check- Article-or-Video","date":"July 6, 2015","format":false,"excerpt":"\u09b0\u09bf\u09a6\u0993\u09df\u09be\u09a8 \u09ac\u09bf\u09a8 \u09b6\u09be\u09ae\u09c0\u09ae \u00a0 \u09ac\u09bf\u09ad\u09bf\u09a8\u09cd\u09a8 \u0995\u09be\u099c\u09c7\u09b0 \u099c\u09a8\u09cd\u09af \u09b2\u09c1\u09aa \u09a4\u09c8\u09b0\u09bf \u0993 \u09ac\u09cd\u09af\u09ac\u09b9\u09be\u09b0 \u0995\u09b0\u09be\u09b0 \u09b8\u09be\u09a5\u09c7 \u0986\u09ae\u09b0\u09be \u09b8\u09ac\u09be\u0987 \u09aa\u09b0\u09bf\u099a\u09bf\u09a4\u0964 \u0995\u0996\u09a8\u09cb \u0995\u0996\u09a8\u09cb \u09b2\u09c1\u09aa \u098f\u09dc\u09be\u09a8\u09cb \u09ac\u09be \u098f\u09b0 \u09aa\u09c1\u09a8\u09b0\u09be\u09ac\u09c3\u09a4\u09cd\u09a4\u09bf \u0995\u09b0\u09be \u09aa\u09cd\u09b0\u09df\u09cb\u099c\u09a8 \u09b9\u09df\u09c7 \u09aa\u09b0\u09c7\u0964 \u00a0 \u09b8\u09c7\u09b2 \u09b2\u09c1\u09aa \u09a8\u09bf\u09df\u09a8\u09cd\u09a4\u09cd\u09b0\u09a3\u09c7\u09b0 \u099c\u09a8\u09cd\u09af \u09a6\u09c1\u099f\u09bf \u09b8\u09cd\u099f\u09c7\u099f\u09ae\u09c7\u09a8\u09cd\u099f \u09a8\u09bf\u09df\u09c7 \u0986\u09ae\u09b0\u09be \u0986\u09b2\u09cb\u099a\u09a8\u09be \u0995\u09b0\u09ac\u0964 \u09ac\u09cd\u09b0\u09c7\u0995 \u09b8\u09cd\u099f\u09c7\u099f\u09ae\u09c7\u09a8\u09cd\u099f \u0995\u09a8\u09cd\u099f\u09bf\u09a8\u09bf\u0989 \u09b8\u09cd\u099f\u09c7\u099f\u09ae\u09c7\u09a8\u09cd\u099f \u00a0 \u0987\u09a8\u09ab\u09bf\u09a8\u09bf\u099f \u09b2\u09c1\u09aa \u09b8\u09ac \u09b2\u09c1\u09aa\u09c7\u09b0 \u09b6\u09c1\u09b0\u09c1 \u09ac\u09be \u09b6\u09c7\u09b7\u2026","rel":"","context":"In &quot;\u09b2\u09bf\u09a8\u09be\u0995\u09cd\u09b8 \u098f\u09ac\u0982 \u0989\u09a8\u09bf\u0995\u09cd\u09b8 \u0964 Linux and Unix&quot;","block_context":{"text":"\u09b2\u09bf\u09a8\u09be\u0995\u09cd\u09b8 \u098f\u09ac\u0982 \u0989\u09a8\u09bf\u0995\u09cd\u09b8 \u0964 Linux and Unix","link":"http:\/\/bangla.sitestree.com\/?cat=1231"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/65744","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=65744"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/65744\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=65744"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=65744"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=65744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}