<?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 ENV= kshrc in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/env-kshrc/m-p/3493736#M215428</link>
    <description>Can any tell me what this default ENV statement&lt;BR /&gt;does? &lt;BR /&gt;&lt;BR /&gt;START=$HOME/.kshrc&lt;BR /&gt;ENV=${START[(_$-=1)+(_=0)-(_$-!=_${-%%*i*})]}&lt;BR /&gt;&lt;BR /&gt;As opposed to just using ENV=$HOME/.kshrc.&lt;BR /&gt;</description>
    <pubDate>Fri, 25 Feb 2005 15:57:39 GMT</pubDate>
    <dc:creator>jerry1</dc:creator>
    <dc:date>2005-02-25T15:57:39Z</dc:date>
    <item>
      <title>ENV= kshrc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/env-kshrc/m-p/3493736#M215428</link>
      <description>Can any tell me what this default ENV statement&lt;BR /&gt;does? &lt;BR /&gt;&lt;BR /&gt;START=$HOME/.kshrc&lt;BR /&gt;ENV=${START[(_$-=1)+(_=0)-(_$-!=_${-%%*i*})]}&lt;BR /&gt;&lt;BR /&gt;As opposed to just using ENV=$HOME/.kshrc.&lt;BR /&gt;</description>
      <pubDate>Fri, 25 Feb 2005 15:57:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/env-kshrc/m-p/3493736#M215428</guid>
      <dc:creator>jerry1</dc:creator>
      <dc:date>2005-02-25T15:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: ENV= kshrc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/env-kshrc/m-p/3493737#M215429</link>
      <description>the result is that your .kshrc is sourced only if the shell being run is interactive.  If the shell isn't interactive the .kshrc file isn't sourced.&lt;BR /&gt;&lt;BR /&gt;it is explained in more detail in an HP shell manual:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B2355-90046/ch23s02.html" target="_blank"&gt;http://docs.hp.com/en/B2355-90046/ch23s02.html&lt;/A&gt;</description>
      <pubDate>Fri, 25 Feb 2005 18:02:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/env-kshrc/m-p/3493737#M215429</guid>
      <dc:creator>c_51</dc:creator>
      <dc:date>2005-02-25T18:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: ENV= kshrc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/env-kshrc/m-p/3493738#M215430</link>
      <description>This is not working out for me.&lt;BR /&gt;&lt;BR /&gt;Here is the doc info below. But like the&lt;BR /&gt;example below. I get an echo output for both&lt;BR /&gt;[0] and [1] which may explain why on some&lt;BR /&gt;non interactive scritps I get the stty: Not a&lt;BR /&gt;typewriter. message. Also get ": ( :" not&lt;BR /&gt;set. If the session is interactive then it&lt;BR /&gt;works.&lt;BR /&gt;&lt;BR /&gt;----------------------------&lt;BR /&gt;You can turn off the processing of the ENV file for noninteractive shells with the following in your ~/.profile:&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;export ENV='${FILE[(_$-=1)+(_=0)-(_$-!=_${-%%*i*})]}'&lt;BR /&gt;export FILE=$HOME/.envfile &lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;The idea behind this scheme is to set up an array (FILE) whose first element is the file we want executed at startup, and whose second element is null.&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;$ export FILE=$HOME/.envfile&lt;BR /&gt;$ echo $FILE[0]/users/pbm/.envfile&lt;BR /&gt;$ echo $FILE[1] &lt;BR /&gt;$ &lt;BR /&gt;&lt;BR /&gt;-------------------------------------&lt;BR /&gt;&lt;BR /&gt;Can anyone give more info on the use of this&lt;BR /&gt;function and does anyone have any good&lt;BR /&gt;way to set the DISPLAY. I am using the&lt;BR /&gt;following below in .profile. Two tests&lt;BR /&gt;because sun has different output with "who"&lt;BR /&gt;command. These statements are also giving&lt;BR /&gt;problems with NCD xterm booting of .xsession&lt;BR /&gt;file. &lt;BR /&gt;&lt;BR /&gt;if [ "`uname -s`" = "HP-UX" ];then&lt;BR /&gt;   DISPLAY=`/usr/bin/who -mR | awk '{print $6}' | sed -e "s/(//" -e "s/)//"`:0.0&lt;BR /&gt;else&lt;BR /&gt;   DISPLAY=`/usr/bin/who -m  | awk '{print $6}' | sed -e "s/(//" -e "s/)//"`&lt;BR /&gt;fi&lt;BR /&gt;export DISPLAY&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Mar 2005 11:18:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/env-kshrc/m-p/3493738#M215430</guid>
      <dc:creator>jerry1</dc:creator>
      <dc:date>2005-03-03T11:18:16Z</dc:date>
    </item>
  </channel>
</rss>

