<?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 Re: Adding addition VARIABLE to default env in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-addition-variable-to-default-env/m-p/2586816#M856652</link>
    <description>Hi James,&lt;BR /&gt;&lt;BR /&gt;One more thing, if you are just looking for this one variable then you could try something like,&lt;BR /&gt;&lt;BR /&gt;remsh cancuun "export VAXSRV=maui ; env"&lt;BR /&gt;&lt;BR /&gt;-Regards&lt;BR /&gt;Ramesh</description>
    <pubDate>Fri, 28 Sep 2001 13:07:32 GMT</pubDate>
    <dc:creator>linuxfan</dc:creator>
    <dc:date>2001-09-28T13:07:32Z</dc:date>
    <item>
      <title>Adding addition VARIABLE to default env</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-addition-variable-to-default-env/m-p/2586813#M856649</link>
      <description>I have two HP servers  running HP10.20&lt;BR /&gt;if I run the command&lt;BR /&gt;remsh cancun env it returns the basic info&lt;BR /&gt;PATH=/usr/bin:etc&lt;BR /&gt;LOGNAME=jmarrion&lt;BR /&gt;SHELL=/usr/bin/sh&lt;BR /&gt;HOME=/jmarrion&lt;BR /&gt;PWD=/home/jmarrion&lt;BR /&gt;TZ=EST5EDT&lt;BR /&gt;&lt;BR /&gt;What I would like is to have another one&lt;BR /&gt;VAXSVR=maui&lt;BR /&gt;&lt;BR /&gt;I have added this to /etc/profile but it only display the variable if the user logins into the platforms.  With the remsh command it doesnt show.</description>
      <pubDate>Fri, 28 Sep 2001 12:52:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-addition-variable-to-default-env/m-p/2586813#M856649</guid>
      <dc:creator>Belinda Dermody</dc:creator>
      <dc:date>2001-09-28T12:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Adding addition VARIABLE to default env</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-addition-variable-to-default-env/m-p/2586814#M856650</link>
      <description>remsh uses the default shell csh.  try added the variable to the .cshrc in the users home directory</description>
      <pubDate>Fri, 28 Sep 2001 13:01:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-addition-variable-to-default-env/m-p/2586814#M856650</guid>
      <dc:creator>Jeff Machols</dc:creator>
      <dc:date>2001-09-28T13:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Adding addition VARIABLE to default env</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-addition-variable-to-default-env/m-p/2586815#M856651</link>
      <description>Hi James,&lt;BR /&gt;&lt;BR /&gt;By default, remsh uses the path (from the man page)/usr/bin:/usr/ccs/bin:/usr/bin/X11&lt;BR /&gt;&lt;BR /&gt;to execute another profile&lt;BR /&gt;&lt;BR /&gt;remsh cancun . ~/.profile ; env&lt;BR /&gt;&lt;BR /&gt;or if you have a file where you have all your environment variables stored, source it and then check your env&lt;BR /&gt;&lt;BR /&gt;remsh cancun -n ". envfile ; env"&lt;BR /&gt;&lt;BR /&gt;Check the man page of remsh for more information&lt;BR /&gt;&lt;BR /&gt;-HTH&lt;BR /&gt;Ramesh</description>
      <pubDate>Fri, 28 Sep 2001 13:05:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-addition-variable-to-default-env/m-p/2586815#M856651</guid>
      <dc:creator>linuxfan</dc:creator>
      <dc:date>2001-09-28T13:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Adding addition VARIABLE to default env</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-addition-variable-to-default-env/m-p/2586816#M856652</link>
      <description>Hi James,&lt;BR /&gt;&lt;BR /&gt;One more thing, if you are just looking for this one variable then you could try something like,&lt;BR /&gt;&lt;BR /&gt;remsh cancuun "export VAXSRV=maui ; env"&lt;BR /&gt;&lt;BR /&gt;-Regards&lt;BR /&gt;Ramesh</description>
      <pubDate>Fri, 28 Sep 2001 13:07:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-addition-variable-to-default-env/m-p/2586816#M856652</guid>
      <dc:creator>linuxfan</dc:creator>
      <dc:date>2001-09-28T13:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: Adding addition VARIABLE to default env</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-addition-variable-to-default-env/m-p/2586817#M856653</link>
      <description>How are you getting the variables through remsh?.&lt;BR /&gt;&lt;BR /&gt;remsh doesn't execute your .profile.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Fri, 28 Sep 2001 13:07:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-addition-variable-to-default-env/m-p/2586817#M856653</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2001-09-28T13:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: Adding addition VARIABLE to default env</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-addition-variable-to-default-env/m-p/2586818#M856654</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;One approach is to add your variable to the remote users .profile.&lt;BR /&gt;&lt;BR /&gt;something like this:&lt;BR /&gt;remsh remotehost . .profile 2&amp;gt;&amp;amp;- \; mycmd.sh&lt;BR /&gt;&lt;BR /&gt;The 2&amp;gt;&amp;amp;- discards any error messages genererated by terminal related commands like stty when stdin is not a terminal. mycmd.sh is then run with the environment setup.&lt;BR /&gt;&lt;BR /&gt;You could alter the .profile to test for this condition and bypass the stty stuff and not have to use the 2&amp;gt;&amp;amp;- stuff.&lt;BR /&gt;&lt;BR /&gt;Like this:&lt;BR /&gt;if [ -t 0 ]&lt;BR /&gt;  then&lt;BR /&gt;    stty ...&lt;BR /&gt;    tabs ...&lt;BR /&gt;  fi&lt;BR /&gt;&lt;BR /&gt;I normally do the in my .profiles anyway.&lt;BR /&gt;You could also include an entry to source your variables from a localfile&lt;BR /&gt;&lt;BR /&gt;. /usr/local/bin/env.sh&lt;BR /&gt;&lt;BR /&gt;and env.sh would look like this&lt;BR /&gt;VAXSVR=maui&lt;BR /&gt;HOST=`usr/bin/hostname` &lt;BR /&gt;export VAXSVR HOST&lt;BR /&gt;&lt;BR /&gt;Just don't put an exit statement at the end of this sourced file.&lt;BR /&gt;    &lt;BR /&gt;Regards, Clay</description>
      <pubDate>Fri, 28 Sep 2001 13:19:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-addition-variable-to-default-env/m-p/2586818#M856654</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-09-28T13:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Adding addition VARIABLE to default env</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-addition-variable-to-default-env/m-p/2586819#M856655</link>
      <description>Thanks for all the response, most likely I didn't express myself correctly.   I have multiple VAX servers for prod,test and development and which unix platform the user is running on depends upon which VAX server to send the output.&lt;BR /&gt;&lt;BR /&gt;1. For one thing we all use sh or ksh here.&lt;BR /&gt;&lt;BR /&gt;2. I have added the VAXSVR variable to /etc/d.profile so it is set in everyones /home/.profile&lt;BR /&gt;&lt;BR /&gt;3. What I do not want to do is to have to source the .profile for each script that I have written to set the VAXSVR variable on remote processing.&lt;BR /&gt;&lt;BR /&gt;4.  What I was hopping for, that there is a way to ADD the VAXSCR variable to be set like PATH, SHELL,HOME, PWD,TZ.  They seem to me to be system defaults</description>
      <pubDate>Fri, 28 Sep 2001 13:25:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-addition-variable-to-default-env/m-p/2586819#M856655</guid>
      <dc:creator>Belinda Dermody</dc:creator>
      <dc:date>2001-09-28T13:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Adding addition VARIABLE to default env</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-addition-variable-to-default-env/m-p/2586820#M856656</link>
      <description>Clay&lt;BR /&gt;&lt;BR /&gt;When I execute the following &lt;BR /&gt;remsh cancun . .profile  2&amp;gt;&amp;amp;- \; /tmp/t.sh&lt;BR /&gt;it returns fd = 2</description>
      <pubDate>Fri, 28 Sep 2001 13:35:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-addition-variable-to-default-env/m-p/2586820#M856656</guid>
      <dc:creator>Belinda Dermody</dc:creator>
      <dc:date>2001-09-28T13:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Adding addition VARIABLE to default env</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-addition-variable-to-default-env/m-p/2586821#M856657</link>
      <description>James,&lt;BR /&gt;&lt;BR /&gt;Set it in /etc/profile. If I understood correctly, you want the users to use $VAXVAR variable to do remsh.&lt;BR /&gt;&lt;BR /&gt;Like&lt;BR /&gt;&lt;BR /&gt;$remsh $VAXVAR -l login some_command.&lt;BR /&gt;&lt;BR /&gt;You need to set it in /etc/profile not d.profile.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Fri, 28 Sep 2001 13:51:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-addition-variable-to-default-env/m-p/2586821#M856657</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2001-09-28T13:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Adding addition VARIABLE to default env</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-addition-variable-to-default-env/m-p/2586822#M856658</link>
      <description>Hi again James:&lt;BR /&gt;&lt;BR /&gt;I did the 2&amp;gt;&amp;amp;- \; from memory but it turns out that this old head was ok. I just tried the exact same syntax on a pair of my boxes and all was ok. I rather suspected you had multiple&lt;BR /&gt;servers and that is why I included setting HOST in my earlier example. You could do the same thing and have your .profile run hostname to set that for you.&lt;BR /&gt;&lt;BR /&gt;The exact syntax I used was:&lt;BR /&gt;remsh bugs . .profile 2&amp;gt;&amp;amp;- \; ./test.sh&lt;BR /&gt;&lt;BR /&gt;Test shell in my home directory looked like this:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;HOST=`/usr/bin/hostname`&lt;BR /&gt;echo "This is a test from ${HOST}."&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;The output when run using the above remsh was&lt;BR /&gt;"This is a test from bugs." - just as expected.&lt;BR /&gt;&lt;BR /&gt;Regards, Clay</description>
      <pubDate>Fri, 28 Sep 2001 15:26:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-addition-variable-to-default-env/m-p/2586822#M856658</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-09-28T15:26:12Z</dc:date>
    </item>
  </channel>
</rss>

