{"id":14167,"date":"2018-04-16T21:02:14","date_gmt":"2018-04-17T01:02:14","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/?p=14167"},"modified":"2018-04-16T21:02:14","modified_gmt":"2018-04-17T01:02:14","slug":"%e0%a6%89%e0%a6%a6%e0%a6%be%e0%a6%b9%e0%a6%b0%e0%a6%a3%e0%a6%83-case-%e0%a6%8f%e0%a6%b0-%e0%a6%ac%e0%a7%8d%e0%a6%af%e0%a6%ac%e0%a6%b9%e0%a6%be%e0%a6%b0%e0%a5%a4-%e0%a6%86%e0%a6%9c%e0%a6%95%e0%a7%87","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=14167","title":{"rendered":"\u0989\u09a6\u09be\u09b9\u09b0\u09a3\u0983 case \u098f\u09b0 \u09ac\u09cd\u09af\u09ac\u09b9\u09be\u09b0\u0964 \u0986\u099c\u0995\u09c7\u09b0 \u09a6\u09bf\u09a8\u099f\u09bf\u09b0 \u09a8\u09be\u09ae \u09a6\u09c7\u0996\u09be\u09a8"},"content":{"rendered":"<p>bash-3.2$ cat ksh_case_example_1.sh<br \/>\n#!\/bin\/ksh<\/p>\n<p>#show today&#8217;s day name<br \/>\nDAY=`date +%a`<\/p>\n<p>#show value of $DAY<br \/>\necho $DAY<\/p>\n<p>#based on the value of the DAY variable show the day name in full format<br \/>\ncase &#8220;$DAY&#8221; in<\/p>\n<p>Mon)<br \/>\necho &#8220;Monday&#8221;<br \/>\n;;<\/p>\n<p>Tue)<br \/>\necho &#8220;Tuesday&#8221;<br \/>\n;;<\/p>\n<p>Wed)<br \/>\necho &#8220;Wednesday&#8221;<br \/>\n;;<\/p>\n<p>Thu)<br \/>\necho &#8220;Thursday&#8221;<br \/>\n;;<\/p>\n<p>Fri)<br \/>\necho &#8220;Friday&#8221;<br \/>\n;;<\/p>\n<p>Sat)<br \/>\necho &#8220;Saturday&#8221;<br \/>\n;;<\/p>\n<p>Sun)<br \/>\necho &#8220;Sunday&#8221;<br \/>\n;;<\/p>\n<p>esac<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>Output &#8211; \u09ab\u09b2\u09be\u09ab\u09b2<\/p>\n<p>bash-3.2$ .\/ksh_case_example_1.sh<br \/>\nSun<br \/>\nSunday<\/p>\n","protected":false},"excerpt":{"rendered":"<p>bash-3.2$ cat ksh_case_example_1.sh #!\/bin\/ksh #show today&#8217;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 &#8220;$DAY&#8221; in Mon) echo &#8220;Monday&#8221; ;; Tue) echo &#8220;Tuesday&#8221; ;; Wed) echo &#8220;Wednesday&#8221; ;; Thu) echo &#8220;Thursday&#8221; ;; Fri) echo &#8220;Friday&#8221; ;; Sat) &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=14167\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1888],"tags":[],"class_list":["post-14167","post","type-post","status-publish","format-standard","hentry","category---shell-programming","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":65693,"url":"http:\/\/bangla.sitestree.com\/?p=65693","url_meta":{"origin":14167,"position":0},"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":14148,"url":"http:\/\/bangla.sitestree.com\/?p=14148","url_meta":{"origin":14167,"position":1},"title":"\u09b6\u09c7\u09b2 &#8211; case \u098f\u09b0 \u09ac\u09cd\u09af\u09ac\u09b9\u09be\u09b0 ksh &#8211; \u098f\u0964 Example use of Case in KSH. Show Today&#8217;s Day Name","author":"Sayed","date":"April 15, 2018","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;\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":65726,"url":"http:\/\/bangla.sitestree.com\/?p=65726","url_meta":{"origin":14167,"position":2},"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":[]},{"id":65722,"url":"http:\/\/bangla.sitestree.com\/?p=65722","url_meta":{"origin":14167,"position":3},"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":65728,"url":"http:\/\/bangla.sitestree.com\/?p=65728","url_meta":{"origin":14167,"position":4},"title":"Topic 2: Example: Comments in Shell Scripts #Linux\/Unix: Shell Programming &#8211; 001","author":"Author-Check- Article-or-Video","date":"July 12, 2021","format":false,"excerpt":"bash-3.2$ cat scriptwithcomments.sh #!\/bin\/sh # This script clears the window, greets the user, # and displays the current date and time. #clear # Clear the window echo \"SCRIPT BEGINS\" echo \"Hello $LOGNAME!\" # Greet the user echo echo \"Todays date and time: c\" date # Display current date and time\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":14167,"position":5},"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":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/14167","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\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14167"}],"version-history":[{"count":1,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/14167\/revisions"}],"predecessor-version":[{"id":14168,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/14167\/revisions\/14168"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14167"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}