{"id":14171,"date":"2018-04-16T21:08:30","date_gmt":"2018-04-17T01:08:30","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/?p=14171"},"modified":"2018-04-16T21:15:22","modified_gmt":"2018-04-17T01:15:22","slug":"%e0%a6%ac%e0%a7%83%e0%a6%b9%e0%a6%b8%e0%a7%8d%e0%a6%aa%e0%a6%a4%e0%a6%bf%e0%a6%ac%e0%a6%be%e0%a6%b0-%e0%a6%8f%e0%a6%ac%e0%a6%82-%e0%a6%b6%e0%a7%81%e0%a6%95%e0%a7%8d%e0%a6%b0%e0%a6%ac%e0%a6%be%e0%a6%b0","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=14171","title":{"rendered":"\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0 \u098f\u09ac\u0982 \u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0\u09c7 \/ etc \u09ab\u09cb\u09b2\u09cd\u09a1\u09be\u09b0\u09c7 \u09b8\u09ae\u09b8\u09cd\u09a4 \u09ac\u09bf\u09b7\u09af\u09bc\u09ac\u09b8\u09cd\u09a4\u09c1 \/export\/home\/shell\/test\/etc.tar \u09a4\u09c7  tar \u09b9\u09bf\u09b8\u09be\u09ac\u09c7 backup \u0995\u09b0\u09c1\u09a8"},"content":{"rendered":"<p>#!\/bin\/ksh<\/p>\n<p># on every thursday and friday tar all contents of \/etc folder into \/export\/home\/shell\/test\/. On thursday only create a log file with the list of files<br \/>\n#in the tar file. On thursday untar \/export\/home\/shell\/test\/etc.tar into vfstab . Then log vfstab exist or not information<\/p>\n<p>DAY=`date +%a`<br \/>\nDATESTAMP=`date +%m-%d-%Y-%H:%M`<\/p>\n<p>if [[ &#8220;$DAY&#8221; == Mon ]]<br \/>\nthen<\/p>\n<p>echo &#8220;Today is Monday&#8221;<\/p>\n<p>elif [[ &#8220;$DAY&#8221; == Tue ]]<br \/>\nthen<\/p>\n<p>echo &#8220;Today is Tuesday&#8221;<\/p>\n<p>elif [[ &#8220;$DAY&#8221; == Wed ]]<br \/>\nthen<\/p>\n<p>echo &#8220;Today is Wednesday&#8221;<\/p>\n<p>elif [[ &#8220;$DAY&#8221; == Thu ]]<br \/>\nthen<\/p>\n<p>echo &#8220;Today is Thursday&#8221; >> \/export\/home\/shell\/test\/log\/backup-$DATESTAMP.log<br \/>\ncd \/etc<br \/>\ntar cvf \/export\/home\/shell\/test\/etc.tar * >> \/export\/home\/shell\/test\/log\/backup-$DATESTAMP.log<br \/>\ncd \/export\/home\/shell\/test<br \/>\ntar xvf etc.tar vfstab<\/p>\n<p>if [[ -f vfstab ]]<br \/>\nthen<br \/>\necho &#8220;file vfstab exist&#8221; >> \/export\/home\/shell\/test\/log\/backup-$DATESTAMP.log<br \/>\nelse<br \/>\necho &#8220;file vfstab does not exist&#8221; >> \/export\/home\/shell\/test\/log\/backup-$DATESTAMP.log<br \/>\nfi<\/p>\n<p>elif [[ &#8220;$DAY&#8221; == Fri ]]<br \/>\nthen<\/p>\n<p>echo &#8220;Today is Friday&#8221;<br \/>\ncd \/etc<br \/>\ntar cvf \/export\/home\/shell\/test\/etc.tar *<\/p>\n<p>elif [[ &#8220;$DAY&#8221; == Sat ]]<br \/>\nthen<br \/>\necho &#8220;Today is Saturday&#8221;<\/p>\n<p>else<br \/>\necho &#8220;Today is Sunday&#8221;<\/p>\n<p>fi<\/p>\n<p>exit<\/p>\n","protected":false},"excerpt":{"rendered":"<p>#!\/bin\/ksh # on every thursday and friday tar all contents of \/etc folder into \/export\/home\/shell\/test\/. On thursday only create a log file with the list of files #in the tar file. On thursday untar \/export\/home\/shell\/test\/etc.tar into vfstab . Then log vfstab exist or not information DAY=`date +%a` DATESTAMP=`date +%m-%d-%Y-%H:%M` if [[ &#8220;$DAY&#8221; == Mon ]] &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=14171\">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-14171","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":65718,"url":"http:\/\/bangla.sitestree.com\/?p=65718","url_meta":{"origin":14171,"position":0},"title":"On Thursday and Friday tar all contents of \/etc folder into \/export\/home\/shell\/test\/etc.tar .. do misc logs #Linux\/Unix: Shell Programming &#8211; 001","author":"Author-Check- Article-or-Video","date":"July 12, 2021","format":false,"excerpt":"#!\/bin\/ksh # on every thursday and friday tar all contents of \/etc folder into \/export\/home\/shell\/test\/. On thursday only create a log file with the list of files #in the tar file. On thursday untar \/export\/home\/shell\/test\/etc.tar into vfstab . Then log vfstab exist or not information DAY=`date +%a` DATESTAMP=`date +%m-%d-%Y-%H:%M` if\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":65720,"url":"http:\/\/bangla.sitestree.com\/?p=65720","url_meta":{"origin":14171,"position":1},"title":"If then else example in Shell Programming #Linux\/Unix: Shell Programming &#8211; 001","author":"Author-Check- Article-or-Video","date":"July 12, 2021","format":false,"excerpt":"#!\/bin\/sh #If then else example #if elif else NOF=5 if [ $NOF -eq 27 ] then echo \"No of files and directories = 27\" elif [ $NOF -gt 27 ] then echo \"No of files are dir are greator than 27\" else echo \"No of files and directories are less\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":14027,"url":"http:\/\/bangla.sitestree.com\/?p=14027","url_meta":{"origin":14171,"position":2},"title":"SSH\/SSHD\/OpenSSH in CentOS\/Redhat Linux","author":"Sayed","date":"December 24, 2017","format":false,"excerpt":"Experiment with SSH\/SSHD\/OpenSSH in CentOS\/Redhat Linux Yes, from\u00a0 my history (Probably a review for the technical people, who already knew these sometimes in the past) 461 echo \"dec 24th, 2017\" 462 vim \/etc\/ssh\/sshd_config 463 echo \"SSH Related Commands\" 464 scp -> secure copy 465 tscp -> secure copy for windows\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":[]},{"id":65722,"url":"http:\/\/bangla.sitestree.com\/?p=65722","url_meta":{"origin":14171,"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":65685,"url":"http:\/\/bangla.sitestree.com\/?p=65685","url_meta":{"origin":14171,"position":4},"title":"A Basic Shell Program #Linux\/Unix: Shell Programming &#8211; 001","author":"Author-Check- Article-or-Video","date":"July 11, 2021","format":false,"excerpt":"#!\/bin\/sh #if enabled - will spit out the script to the screen #set -v #clear the screen clear echo \"SCRIPT BEGINS\" #shows current login name echo \"Hello $LOGNAME\" #shows current date in the same line echo \"Todays date is: c\" date +%m\/%d\/%y #shows current time in the same line echo\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":14169,"url":"http:\/\/bangla.sitestree.com\/?p=14169","url_meta":{"origin":14171,"position":5},"title":"\u09b6\u09c7\u09b2 \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae\u09bf\u0982 \u098f if-then-else \u098f\u09b0 \u0989\u09a6\u09be\u09b9\u09b0\u09a3","author":"Sayed","date":"April 16, 2018","format":false,"excerpt":"#!\/bin\/sh #If then else example #if elif else NOF=5 if [ $NOF -eq 27 ] then echo \"No of files and directories = 27\" elif [ $NOF -gt 27 ] then echo \"No of files are dir are greator than 27\" else echo \"No of files and directories are less\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":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/14171","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=14171"}],"version-history":[{"count":2,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/14171\/revisions"}],"predecessor-version":[{"id":14177,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/14171\/revisions\/14177"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14171"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}