{"id":65746,"date":"2021-07-13T04:10:04","date_gmt":"2021-07-13T08:10:04","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/topic-3-example-simple-expr-statement-in-shell-scripting-linux-unix-shell-programming-001\/"},"modified":"2021-07-13T04:10:04","modified_gmt":"2021-07-13T08:10:04","slug":"topic-3-example-simple-expr-statement-in-shell-scripting-linux-unix-shell-programming-001","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=65746","title":{"rendered":"Topic 3: Example: Simple expr statement in shell scripting #Linux\/Unix: Shell Programming &#8211; 001"},"content":{"rendered":"<blockquote><p>bash-3.2$ cat operator5.sh<br \/>\n#!\/bin\/ksh<br \/>\nnum1=10<br \/>\nnum2=20<br \/>\necho $num1<br \/>\nnum2=`expr $num1 + 25`<br \/>\necho $num2<br \/>\nnum3=`expr $num1 + $num2`<br \/>\necho $num3<br \/>\nnum4=`expr $num1 * $num2`<br \/>\necho $num4<br \/>\nnum5=`expr $num2 \/ $num1`<br \/>\necho $num5<br \/>\nnum6=`expr $num1 % 3`<br \/>\necho $num6<\/p>\n<p>&nbsp;<\/p>\n<p>bash-3.2$ .\/operator5.sh<br \/>\n10<br \/>\n35<br \/>\n45<br \/>\n350<br \/>\n3<br \/>\n1<\/p><\/blockquote>\n<p> From: http:\/\/sitestree.com\/?p=12232<br \/> Categories:Linux\/Unix: Shell Programming &#8211; 001<br \/>Tags:<br \/> Post Data:2018-05-07 15:17:44<\/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 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 &nbsp; bash-3.2$ .\/operator5.sh 10 35 45 350 3 1 From: http:\/\/sitestree.com\/?p=12232 Categories:Linux\/Unix: Shell Programming &#8211; 001Tags: Post &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=65746\">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-65746","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":65744,"url":"http:\/\/bangla.sitestree.com\/?p=65744","url_meta":{"origin":65746,"position":0},"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":65689,"url":"http:\/\/bangla.sitestree.com\/?p=65689","url_meta":{"origin":65746,"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":65746,"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":65746,"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":65746,"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":65716,"url":"http:\/\/bangla.sitestree.com\/?p=65716","url_meta":{"origin":65746,"position":5},"title":"While Loop Example in Shell Programming. Display a Chart #Linux\/Unix: Shell Programming &#8211; 001","author":"Author-Check- Article-or-Video","date":"July 12, 2021","format":false,"excerpt":"Example Output bash-3.2$ .\/while-loop-example.sh Enter your Number 10 10 * 1 = 10 10 * 2 = 20 10 * 3 = 30 10 * 4 = 40 10 * 5 = 50 10 * 6 = 60 10 * 7 = 70 10 * 8 = 80 10 *\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\/65746","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=65746"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/65746\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=65746"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=65746"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=65746"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}