<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic TERM - Environment Variable in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254126#M175876</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;At present, we have 2 different kind of terminals, of which one of them support vt100 and the other support hpterm.&lt;BR /&gt;&lt;BR /&gt;By default, when a admin user logon to the system, the TERM value is vt100.&lt;BR /&gt;&lt;BR /&gt;venus:oracn2 &amp;gt; echo $TERM&lt;BR /&gt;vt100&lt;BR /&gt;&lt;BR /&gt;What I have done is, I have created a file and inserted the following lines in it:&lt;BR /&gt;&lt;BR /&gt;setenv TERM hpterm&lt;BR /&gt;clear&lt;BR /&gt;&lt;BR /&gt;When I executed the file, the system is responding witht he following error message:&lt;BR /&gt;&lt;BR /&gt;venus:oracn2 27&amp;gt; ./envterm&lt;BR /&gt;./envterm: setenv:  not found.&lt;BR /&gt;&lt;BR /&gt;But when I executed the follwoing command directly, it works fine:&lt;BR /&gt;setenv TERM hpterm&lt;BR /&gt;clear&lt;BR /&gt;&lt;BR /&gt;What am I doing wrong in executing the file?&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; regards,&lt;BR /&gt;Nikee&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 20 Apr 2004 15:22:39 GMT</pubDate>
    <dc:creator>Nikee Reddy</dc:creator>
    <dc:date>2004-04-20T15:22:39Z</dc:date>
    <item>
      <title>TERM - Environment Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254126#M175876</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;At present, we have 2 different kind of terminals, of which one of them support vt100 and the other support hpterm.&lt;BR /&gt;&lt;BR /&gt;By default, when a admin user logon to the system, the TERM value is vt100.&lt;BR /&gt;&lt;BR /&gt;venus:oracn2 &amp;gt; echo $TERM&lt;BR /&gt;vt100&lt;BR /&gt;&lt;BR /&gt;What I have done is, I have created a file and inserted the following lines in it:&lt;BR /&gt;&lt;BR /&gt;setenv TERM hpterm&lt;BR /&gt;clear&lt;BR /&gt;&lt;BR /&gt;When I executed the file, the system is responding witht he following error message:&lt;BR /&gt;&lt;BR /&gt;venus:oracn2 27&amp;gt; ./envterm&lt;BR /&gt;./envterm: setenv:  not found.&lt;BR /&gt;&lt;BR /&gt;But when I executed the follwoing command directly, it works fine:&lt;BR /&gt;setenv TERM hpterm&lt;BR /&gt;clear&lt;BR /&gt;&lt;BR /&gt;What am I doing wrong in executing the file?&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; regards,&lt;BR /&gt;Nikee&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Apr 2004 15:22:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254126#M175876</guid>
      <dc:creator>Nikee Reddy</dc:creator>
      <dc:date>2004-04-20T15:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: TERM - Environment Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254127#M175877</link>
      <description>setenv is not a POSIX or Korn shell command but rather a csh command. I suspect that you shell is csh but when you execute your file, it's executing as a POSIX shell.&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Apr 2004 15:26:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254127#M175877</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-04-20T15:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: TERM - Environment Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254128#M175878</link>
      <description>you should probably use the command&lt;BR /&gt;export TERM=hpterm&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;Scott</description>
      <pubDate>Tue, 20 Apr 2004 15:30:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254128#M175878</guid>
      <dc:creator>Scott Palmer_1</dc:creator>
      <dc:date>2004-04-20T15:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: TERM - Environment Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254129#M175879</link>
      <description>setenv is part of csh&lt;BR /&gt;&lt;BR /&gt;without a !#/usr/bin/csh line your script will run as posix, which does not understand setenv.</description>
      <pubDate>Tue, 20 Apr 2004 15:31:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254129#M175879</guid>
      <dc:creator>Marvin Strong</dc:creator>
      <dc:date>2004-04-20T15:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: TERM - Environment Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254130#M175880</link>
      <description>opps #!/usr/bin/csh &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Apr 2004 15:32:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254130#M175880</guid>
      <dc:creator>Marvin Strong</dc:creator>
      <dc:date>2004-04-20T15:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: TERM - Environment Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254131#M175881</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Have you tried evaluating TERM in your profile.&lt;BR /&gt;&lt;BR /&gt;-----&lt;BR /&gt;# Set up the terminal:&lt;BR /&gt;      if [ "$TERM" = "" ]&lt;BR /&gt;      then&lt;BR /&gt;          eval ` tset -s -Q -m ':?hp' `&lt;BR /&gt;      else&lt;BR /&gt;          eval ` tset -s -Q `&lt;BR /&gt;      fi&lt;BR /&gt;      stty erase "^H" kill "^U" intr "^C" eof "^D"&lt;BR /&gt;      stty hupcl ixon ixoff&lt;BR /&gt;      tabs&lt;BR /&gt;-----&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Regds&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Apr 2004 15:32:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254131#M175881</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2004-04-20T15:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: TERM - Environment Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254132#M175882</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have entered the following lines in the file:&lt;BR /&gt;#!/usr/bin/csh&lt;BR /&gt;setenv TERM hpterm&lt;BR /&gt;clear &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I could able to execute the file with out any problems, but when I ran the following command I still see the same value for TERM i.e. vt100&lt;BR /&gt;&lt;BR /&gt;venus:oracn2 24&amp;gt; echo $TERM&lt;BR /&gt;vt100&lt;BR /&gt;&lt;BR /&gt;It shoud suppose to show me as hpterm instead as vt100 !!!!!!!!&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Nikee</description>
      <pubDate>Tue, 20 Apr 2004 15:38:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254132#M175882</guid>
      <dc:creator>Nikee Reddy</dc:creator>
      <dc:date>2004-04-20T15:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: TERM - Environment Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254133#M175883</link>
      <description>Sorry, I didn't mean to mislead you, adding that will make your script run because it is now running in csh, but it will not solve your problem. Do to the nature of what #! does. &lt;BR /&gt;&lt;BR /&gt;Your best course of action is to create a condition in your .profile that sets determines your TERM. As mentioned above. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Apr 2004 15:44:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254133#M175883</guid>
      <dc:creator>Marvin Strong</dc:creator>
      <dc:date>2004-04-20T15:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: TERM - Environment Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254134#M175884</link>
      <description>I think what youm should do it to keep script1.sh as follows,&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;export TERM=vt100&lt;BR /&gt;clear&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;And it should be executed as follows&lt;BR /&gt;&lt;BR /&gt;/home/kaps&amp;gt;. script1        #Please note the "DOT" in front&lt;BR /&gt;&lt;BR /&gt;Regds,&lt;BR /&gt;&lt;BR /&gt;Kaps</description>
      <pubDate>Wed, 21 Apr 2004 00:35:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254134#M175884</guid>
      <dc:creator>KapilRaj</dc:creator>
      <dc:date>2004-04-21T00:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: TERM - Environment Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254135#M175885</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;if you are running a csh / tcsh Shell, you must call&lt;BR /&gt;&lt;BR /&gt;source script&lt;BR /&gt;&lt;BR /&gt;to get the commands of script 'inline'&lt;BR /&gt;(not . script - this is for POSIX shells).&lt;BR /&gt;Otherwise the change of the environment&lt;BR /&gt;will not survive the newly created process...&lt;BR /&gt;&lt;BR /&gt;If you want the changed value as a default,&lt;BR /&gt;put the commands in your ~/.chsrc&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Wed, 21 Apr 2004 04:31:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254135#M175885</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2004-04-21T04:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: TERM - Environment Variable</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254136#M175886</link>
      <description>You all are right, but just to make it clear to the author:&lt;BR /&gt;&lt;BR /&gt;1- when you run a script you have to specify the interpreter&lt;BR /&gt;2- all the environment settings made into a script will remain _into_ the script because it's run into another shell (which inherits some properties and envs of the father shell) invoked on the first line, and that shell will close automatically at the end of the script&lt;BR /&gt;3- to run a script in the current shell and not in another one you should &lt;BR /&gt;3a- write it using the current shell commands&lt;BR /&gt;3b- invoke it using the command "source" for [t]csh; or ". " note the blank after the dot, for "bourne shells" as sh/ksh/ash; latest bash supports both methods&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;After doing that, please, look at &lt;A href="http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html" target="_blank"&gt;http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html&lt;/A&gt;&lt;BR /&gt;it could be a starting point&lt;BR /&gt;&lt;BR /&gt;Pax, R.</description>
      <pubDate>Wed, 21 Apr 2004 05:05:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/term-environment-variable/m-p/3254136#M175886</guid>
      <dc:creator>Roberto Polli</dc:creator>
      <dc:date>2004-04-21T05:05:06Z</dc:date>
    </item>
  </channel>
</rss>

