<?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: PATH variable not being used in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/path-variable-not-being-used/m-p/2571860#M873379</link>
    <description>hi,&lt;BR /&gt;&lt;BR /&gt;is it a batch program you are running (through crontab) ??&lt;BR /&gt;/bin &amp;amp; /usr/bin is the default path when executing cron jobs; you have to add the necessary environment variable explicitely in your script  (by sourcing your .profile, or another settings script)&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;Thierry.</description>
    <pubDate>Wed, 29 Aug 2001 08:50:03 GMT</pubDate>
    <dc:creator>Thierry Poels_1</dc:creator>
    <dc:date>2001-08-29T08:50:03Z</dc:date>
    <item>
      <title>PATH variable not being used</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/path-variable-not-being-used/m-p/2571859#M873378</link>
      <description>I have Perl installed in /opt/perl5/bin. This path is appended to the user's PATH variable in his .profile as follows : &lt;BR /&gt;&lt;BR /&gt;PATH=$PATH:/opt/perl5/bin;export PATH&lt;BR /&gt;&lt;BR /&gt;When he logs in and echoes $PATH, he sees the following : &lt;BR /&gt;&lt;BR /&gt;/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/opt/nettladm/bin:/opt/upgrade/bin:/usr/b&lt;BR /&gt;in/X11:/usr/contrib/bin/X11:/opt/hpnp//bin:/opt/omni/bin:/opt/hparray/bin:/opt/p&lt;BR /&gt;red/bin:/home/russg:.:/opt/perl5/bin&lt;BR /&gt;&lt;BR /&gt;BUT when he enters 'which perl' he gets this : &lt;BR /&gt;&lt;BR /&gt;no perl in /bin /usr/bin&lt;BR /&gt;&lt;BR /&gt;and cannot run any perl scripts. Why can't he find perl when it's in his PATH ? &lt;BR /&gt;&lt;BR /&gt;Many thanks in advance.</description>
      <pubDate>Wed, 29 Aug 2001 08:42:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/path-variable-not-being-used/m-p/2571859#M873378</guid>
      <dc:creator>Preet Dhillon</dc:creator>
      <dc:date>2001-08-29T08:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: PATH variable not being used</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/path-variable-not-being-used/m-p/2571860#M873379</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;is it a batch program you are running (through crontab) ??&lt;BR /&gt;/bin &amp;amp; /usr/bin is the default path when executing cron jobs; you have to add the necessary environment variable explicitely in your script  (by sourcing your .profile, or another settings script)&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;Thierry.</description>
      <pubDate>Wed, 29 Aug 2001 08:50:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/path-variable-not-being-used/m-p/2571860#M873379</guid>
      <dc:creator>Thierry Poels_1</dc:creator>
      <dc:date>2001-08-29T08:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: PATH variable not being used</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/path-variable-not-being-used/m-p/2571861#M873380</link>
      <description>Hi,&lt;BR /&gt;I agree with Thierry it can be a batch bad setting, or a reset of the environment by an application or some custom profile called later, are you sure you get this straight after logging in? if so whats after you PATH=..., in the .profile?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Victor</description>
      <pubDate>Wed, 29 Aug 2001 09:00:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/path-variable-not-being-used/m-p/2571861#M873380</guid>
      <dc:creator>Victor BERRIDGE</dc:creator>
      <dc:date>2001-08-29T09:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: PATH variable not being used</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/path-variable-not-being-used/m-p/2571862#M873381</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;another option is to put following line on top of your perl script:&lt;BR /&gt;&lt;BR /&gt;#! /opt/perl5/bin/perl&lt;BR /&gt;&lt;BR /&gt;good luck,&lt;BR /&gt;Thierry.</description>
      <pubDate>Wed, 29 Aug 2001 09:11:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/path-variable-not-being-used/m-p/2571862#M873381</guid>
      <dc:creator>Thierry Poels_1</dc:creator>
      <dc:date>2001-08-29T09:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: PATH variable not being used</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/path-variable-not-being-used/m-p/2571863#M873382</link>
      <description>Often problems like this have a more simple explanation and we tend to overlook the simple for the complex.  Your user must have reset his path after logging in and before running the which.  The which output indicates which only checked /bin and /usr/bin.  Could your user have reset his path in another script or by su'ing?</description>
      <pubDate>Wed, 29 Aug 2001 13:13:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/path-variable-not-being-used/m-p/2571863#M873382</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2001-08-29T13:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: PATH variable not being used</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/path-variable-not-being-used/m-p/2571864#M873383</link>
      <description>From the man pages of "which":&lt;BR /&gt;&lt;BR /&gt;which's information may be incorrect because it is unaware of any path or alias changes that have occurred in the current shell session.&lt;BR /&gt;&lt;BR /&gt;Try using whereis or whence, although the results are a little strange. Check this out:&lt;BR /&gt;&lt;BR /&gt;# whence perl&lt;BR /&gt;/usr/bin/perl&lt;BR /&gt;# which perl&lt;BR /&gt;/bin/perl&lt;BR /&gt;# whereis perl&lt;BR /&gt;perl: /usr/bin/perl /usr/local/bin/perl5.003 /usr/local/bin/perl /usr/local/bin/perl5.004 /usr/local/lib/perl /usr/local/lib/perl5.004 /usr/contrib/bin/perl /opt/perl5/bin/perl /usr/local/man/man1/perl.1 /opt/perl5/man/man1/perl.1&lt;BR /&gt;# ls -l /bin|grep perl&lt;BR /&gt;# ls -Ll /bin|grep perl&lt;BR /&gt;-r-xr-xr-x   3 root       sys         856217 Feb 12  1998 perl&lt;BR /&gt;# ls -l /|grep bin&lt;BR /&gt;lr-xr-xr-t   1 root       sys              8 May 12  1997 bin -&amp;gt; /usr/bin&lt;BR /&gt;dr-xr-xr-x  16 bin        bin          12288 Aug  7 18:27 dev&lt;BR /&gt;drwxrwxr-x  62 bin        bin           2048 Aug 21 16:41 opt&lt;BR /&gt;dr-xr-xr-x  12 bin        bin           3072 Jul 16 07:57 sbin&lt;BR /&gt;dr-xr-xr-x   4 bin        bin           1024 Aug  7 18:00 stand&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 29 Aug 2001 13:28:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/path-variable-not-being-used/m-p/2571864#M873383</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2001-08-29T13:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: PATH variable not being used</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/path-variable-not-being-used/m-p/2571865#M873384</link>
      <description>Also, make sure the permissions on perl are set to have execution for everyone.&lt;BR /&gt;&lt;BR /&gt;chmod a+x perl</description>
      <pubDate>Wed, 29 Aug 2001 13:50:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/path-variable-not-being-used/m-p/2571865#M873384</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2001-08-29T13:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: PATH variable not being used</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/path-variable-not-being-used/m-p/2571866#M873385</link>
      <description>It seems which will look up a file in your path only if you have the execute permission for that command. It will return with a no found message even if the file is present in you path and you don't have the execute permission for that. &lt;BR /&gt;&lt;BR /&gt;So like harry has advised set the execute permission on that file. Then no matter where you specify the path in you path variable, which should return with the right output.&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
      <pubDate>Wed, 29 Aug 2001 14:31:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/path-variable-not-being-used/m-p/2571866#M873385</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2001-08-29T14:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: PATH variable not being used</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/path-variable-not-being-used/m-p/2571867#M873386</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;From your post:&lt;BR /&gt;&lt;BR /&gt;BUT when he enters 'which perl' he gets this : &lt;BR /&gt;no perl in /bin /usr/bin &lt;BR /&gt;&lt;BR /&gt;When I run which and a file is not found, which lists each directory in my path.  The above indicates only /bin and /usr/bin are in the user's path.  I still wonder if the path was changed after being set in .profile and before the which command was run.&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Wed, 29 Aug 2001 14:52:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/path-variable-not-being-used/m-p/2571867#M873386</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2001-08-29T14:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: PATH variable not being used</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/path-variable-not-being-used/m-p/2571868#M873387</link>
      <description>Hi Preet&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Try this&lt;BR /&gt;&lt;BR /&gt;export PATH=/opt/perl5/bin:$PATH , this should work.&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava</description>
      <pubDate>Wed, 29 Aug 2001 15:13:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/path-variable-not-being-used/m-p/2571868#M873387</guid>
      <dc:creator>MANOJ SRIVASTAVA</dc:creator>
      <dc:date>2001-08-29T15:13:58Z</dc:date>
    </item>
  </channel>
</rss>

