{"id":2315,"date":"2017-12-08T07:18:43","date_gmt":"2017-12-08T07:18:43","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=2315"},"modified":"2020-01-09T09:55:35","modified_gmt":"2020-01-09T09:55:35","slug":"make-sure-script-is-running-using-korn-shell","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/make-sure-script-is-running-using-korn-shell\/","title":{"rendered":"Make sure script is running using korn shell"},"content":{"rendered":"<p><strong>scmuser created the topic: Make sure script is running using korn shell<\/strong><\/p>\n<p>If you have developed a script using the Korn shell, how will you make sure the script will use that shell even if login shell is different?<\/p>\n<p><strong>renjith replied the topic: Re: Make sure script is running using korn shell<\/strong><\/p>\n<p>begin shell script with Shabang\/interpreter line<\/p>\n<p>#!\/bin\/ksh<\/p>\n<p><strong>rajeshkumar replied the topic: Re: Make sure script is running using korn shell<\/strong><\/p>\n<p>There are 2 ways to run a script with specific shell no matter if login shell is different..<\/p>\n<p>Method 1:<br \/>\nUse following before any shell script&#8230;<br \/>\n#!\/bin\/ksh<\/p>\n<p>Method 2:<\/p>\n<p>Execute shell script with ksh <script-name><br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\" target=\"_blank\" rel=\"noopener\">twitter.com\/RajeshKumarIn<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>scmuser created the topic: Make sure script is running using korn shell If you have developed a script using the Korn shell, how will you make sure the script will&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[454],"tags":[278],"class_list":["post-2315","post","type-post","status-publish","format-standard","hentry","category-shell-script","tag-script"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=2315"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2315\/revisions"}],"predecessor-version":[{"id":2316,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2315\/revisions\/2316"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=2315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=2315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=2315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}