{"id":25,"date":"2007-09-19T16:34:00","date_gmt":"2007-09-19T08:34:00","guid":{"rendered":"http:\/\/www.sysadmindayph.com\/blog\/?p=25"},"modified":"2012-02-11T18:47:02","modified_gmt":"2012-02-11T10:47:02","slug":"set-up-environment-variable-on-bourne-bash-korn-and-c-shells","status":"publish","type":"post","link":"http:\/\/www.sysadmindayph.com\/blog\/set-up-environment-variable-on-bourne-bash-korn-and-c-shells\/","title":{"rendered":"Set Up Environment Variable on Bourne, Bash, Korn and C-Shells"},"content":{"rendered":"<p>There are many shells available for the UNIX operating system. Among them are sh (bourne), csh (C), tsch (korn) and bash (bourne again) Shells.<br \/>\n<script type=\"text\/javascript\"><!--\ngoogle_ad_client = \"ca-pub-8839128323193448\";\n\/* sysadmin-bigsquare *\/\ngoogle_ad_slot = \"0154488356\";\ngoogle_ad_width = 336;\ngoogle_ad_height = 280;\n\/\/-->\n<\/script><br \/>\n<script type=\"text\/javascript\"\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\n<\/script><\/p>\n<p>With all these shells, sometimes we can mix all the syntax when assigning values to a variables. Here&#8217;s is another review so you wont forget:<\/p>\n<p><strong>C Shell (csh)<\/strong> or <strong>Korn (tcsh)<\/strong>:<\/p>\n<blockquote><p><em>hostname# <\/em>setenv LD_LIBRARY_PATH \/usr\/local\/lib<em><br \/>\nhostname# <\/em>setenv MYVAR \/usr\/mydir<\/p><\/blockquote>\n<p>$PATH before and after:<\/p>\n<blockquote><p><em>hostname# <\/em>echo $PATH<em><br \/>\n\/usr\/bin:\/bin:\/usr\/sbin:\/sbin<br \/>\nhostname# <\/em>setenv PATH ${PATH}:\/usr\/local\/local\/bin<em><br \/>\nhostname# <\/em>echo $PATH<em><br \/>\n\/usr\/bin:\/bin:\/usr\/sbin:\/sbin:\/usr\/local\/local\/bin<\/em><\/p><\/blockquote>\n<p>For Bash (bash), Bourne (sh) or Korn (tcsh):<\/p>\n<blockquote><p>EDITOR=vi<br \/>\nexport EDITOR<\/p><\/blockquote>\n<p>Study the syntax and let&#8217;s discuss&#8230;<br \/>\n<script type=\"text\/javascript\"><!--\ngoogle_ad_client = \"ca-pub-8839128323193448\";\n\/* sysadmin-bigsquare *\/\ngoogle_ad_slot = \"0154488356\";\ngoogle_ad_width = 336;\ngoogle_ad_height = 280;\n\/\/-->\n<\/script><br \/>\n<script type=\"text\/javascript\"\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are many shells available for the UNIX operating system. Among them are sh (bourne), csh (C), tsch (korn) and bash (bourne again) Shells. With all these shells, sometimes we can mix all the syntax &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,7,3],"tags":[],"class_list":["post-25","post","type-post","status-publish","format-standard","hentry","category-linux","category-operating-system","category-unix"],"_links":{"self":[{"href":"http:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts\/25","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/comments?post=25"}],"version-history":[{"count":1,"href":"http:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts\/25\/revisions"}],"predecessor-version":[{"id":302,"href":"http:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts\/25\/revisions\/302"}],"wp:attachment":[{"href":"http:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/media?parent=25"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/categories?post=25"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/tags?post=25"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}