{"id":149,"date":"2010-03-26T22:02:10","date_gmt":"2010-03-27T03:02:10","guid":{"rendered":"https:\/\/billhiggins.us\/blog\/?p=149"},"modified":"2011-03-27T15:19:16","modified_gmt":"2011-03-27T20:19:16","slug":"adding-a-scripts-folder-to-your-path-in-bash","status":"publish","type":"post","link":"https:\/\/billhiggins.us\/blog\/2010\/03\/26\/adding-a-scripts-folder-to-your-path-in-bash\/","title":{"rendered":"adding a scripts folder to your path in bash"},"content":{"rendered":"<p>I know this is total n00b stuff but I always forget the particular so I thought I&#8217;d write it down in a blog entry.<\/p>\n<p>To add a custom scripts directory to your path, do the following:<\/p>\n<p>In your root directory, create a file called <code>.bash_profile<\/code> with something like the following:<\/p>\n<pre>if [ -f $HOME\/.bashrc ]; then\r\n\u00c2\u00a0\u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0. $HOME\/.bashrc\r\nfi<\/pre>\n<p>Then in <code>.bashrc<\/code>, put something like the following:<\/p>\n<pre>export PATH=$PATH:$HOME\/Scripts<\/pre>\n<p>Make both scripts executable:<\/p>\n<pre>chmod +x .bash*<\/pre>\n<p>For extra credit, create a softlink from your <a href=\"https:\/\/www.dropbox.com\/referrals\/NTIyMDU2MjE5\">Dropbox<\/a> folder to your scripts folder and you can have the same scripts on all of your computers!<\/p>\n<pre>ln -s $HOME\/Scripts $HOME\/Dropbox\/Scripts<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I know this is total n00b stuff but I always forget the particular so I thought I&#8217;d write it down in a blog entry. To add a custom scripts directory to your path, do the following: In your root directory, create a file called .bash_profile with something like the following: if [ -f $HOME\/.bashrc ]; [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[29,32,25,30,31],"class_list":["post-149","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-bash","tag-code","tag-mac","tag-os-x","tag-unix"],"_links":{"self":[{"href":"https:\/\/billhiggins.us\/blog\/wp-json\/wp\/v2\/posts\/149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/billhiggins.us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/billhiggins.us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/billhiggins.us\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/billhiggins.us\/blog\/wp-json\/wp\/v2\/comments?post=149"}],"version-history":[{"count":7,"href":"https:\/\/billhiggins.us\/blog\/wp-json\/wp\/v2\/posts\/149\/revisions"}],"predecessor-version":[{"id":180,"href":"https:\/\/billhiggins.us\/blog\/wp-json\/wp\/v2\/posts\/149\/revisions\/180"}],"wp:attachment":[{"href":"https:\/\/billhiggins.us\/blog\/wp-json\/wp\/v2\/media?parent=149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/billhiggins.us\/blog\/wp-json\/wp\/v2\/categories?post=149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/billhiggins.us\/blog\/wp-json\/wp\/v2\/tags?post=149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}