{"id":37,"date":"2007-02-25T20:14:46","date_gmt":"2007-02-26T02:14:46","guid":{"rendered":"http:\/\/www.schwie.com\/brad\/?p=37"},"modified":"2016-11-17T09:27:53","modified_gmt":"2016-11-17T15:27:53","slug":"make-a-unixbash-script-executable-in-mac-os-x","status":"publish","type":"post","link":"https:\/\/www.schwie.com\/brad\/?p=37","title":{"rendered":"Make a Unix\/bash script executable in Mac OS X"},"content":{"rendered":"<p>For some reason I need make a script executable once every blue moon and I always seem to forget how to do it. Getting old is frustrating.<\/p>\n<p>To make a script executable in Mac OS X, fire up Terminal.app and type this in at the prompt (or\u00a0add a space after the &#8220;x&#8221; below and then\u00a0drag your script on to the Terminal window):<\/p>\n<p>chmod +x \/file\/path\/script_name.sh<\/p>\n<p>Press enter and you&#8217;re done. The single line above makes the script, named &#8220;script_name.sh&#8221; located in the directory &#8220;\/file\/path\/&#8221;, executable. There are probably easier ways to do this, but it works for me.<\/p>\n<p>To execute the script, just type the following into the terminal (assuming you&#8217;re in the same directory as the script):<\/p>\n<p>.\/script_name.sh<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For some reason I need make a script executable once every blue moon and I always seem to forget how to do it. Getting old is frustrating. To make a script executable in Mac OS X, fire up Terminal.app and &hellip; <a href=\"https:\/\/www.schwie.com\/brad\/?p=37\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-37","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.schwie.com\/brad\/index.php?rest_route=\/wp\/v2\/posts\/37","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.schwie.com\/brad\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.schwie.com\/brad\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.schwie.com\/brad\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.schwie.com\/brad\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=37"}],"version-history":[{"count":2,"href":"https:\/\/www.schwie.com\/brad\/index.php?rest_route=\/wp\/v2\/posts\/37\/revisions"}],"predecessor-version":[{"id":396,"href":"https:\/\/www.schwie.com\/brad\/index.php?rest_route=\/wp\/v2\/posts\/37\/revisions\/396"}],"wp:attachment":[{"href":"https:\/\/www.schwie.com\/brad\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=37"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.schwie.com\/brad\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=37"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.schwie.com\/brad\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}