<?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 fpath and null entry in $PATH in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/fpath-and-null-entry-in-path/m-p/3524930#M701375</link>
    <description>When I set FPATH to a single directory and ${PATH} contains a null entry (a leading colon) and I'm in the directory specified in FPATH, it looks like my function doesn't get executed.&lt;BR /&gt;&lt;BR /&gt;Is this expected or have I misunderstood?&lt;BR /&gt;&lt;BR /&gt;/tmp/fpath&amp;gt;cat Called&lt;BR /&gt;#!/bin/sh -u&lt;BR /&gt;Called ( ) {&lt;BR /&gt;echo "In called"&lt;BR /&gt;return 0&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;/tmp/fpath&amp;gt;cat Main&lt;BR /&gt;#!/bin/sh -u&lt;BR /&gt;echo "current PATH=${PATH}"&lt;BR /&gt;FPATH=/tmp/fpath&lt;BR /&gt;Called&lt;BR /&gt;&lt;BR /&gt;/tmp/fpath&amp;gt;./Main&lt;BR /&gt;current PATH=/usr/bin:/usr/sbin&lt;BR /&gt;In called&lt;BR /&gt;&lt;BR /&gt;/tmp/fpath&amp;gt;export PATH=/tmp:${PATH}&lt;BR /&gt;/tmp/fpath&amp;gt;./Main&lt;BR /&gt;current PATH=/tmp:/usr/bin:/usr/sbin&lt;BR /&gt;In called&lt;BR /&gt;/tmp/fpath&amp;gt;cd ..&lt;BR /&gt;/tmp&amp;gt;fpath/Main&lt;BR /&gt;current PATH=/tmp:/usr/bin:/usr/sbin&lt;BR /&gt;In called&lt;BR /&gt;/tmp&amp;gt;cd fpath&lt;BR /&gt;&lt;BR /&gt;/tmp/fpath&amp;gt;export PATH=:${PATH}&lt;BR /&gt;/tmp/fpath&amp;gt;./Main&lt;BR /&gt;current PATH=:/tmp:/usr/bin:/usr/sbin&lt;BR /&gt;/tmp/fpath&amp;gt;cd ..&lt;BR /&gt;/tmp&amp;gt;fpath/Main&lt;BR /&gt;current PATH=:/tmp:/usr/bin:/usr/sbin&lt;BR /&gt;In called&lt;BR /&gt;</description>
    <pubDate>Thu, 14 Apr 2005 09:26:34 GMT</pubDate>
    <dc:creator>Steve Cameron_1</dc:creator>
    <dc:date>2005-04-14T09:26:34Z</dc:date>
    <item>
      <title>fpath and null entry in $PATH</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fpath-and-null-entry-in-path/m-p/3524930#M701375</link>
      <description>When I set FPATH to a single directory and ${PATH} contains a null entry (a leading colon) and I'm in the directory specified in FPATH, it looks like my function doesn't get executed.&lt;BR /&gt;&lt;BR /&gt;Is this expected or have I misunderstood?&lt;BR /&gt;&lt;BR /&gt;/tmp/fpath&amp;gt;cat Called&lt;BR /&gt;#!/bin/sh -u&lt;BR /&gt;Called ( ) {&lt;BR /&gt;echo "In called"&lt;BR /&gt;return 0&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;/tmp/fpath&amp;gt;cat Main&lt;BR /&gt;#!/bin/sh -u&lt;BR /&gt;echo "current PATH=${PATH}"&lt;BR /&gt;FPATH=/tmp/fpath&lt;BR /&gt;Called&lt;BR /&gt;&lt;BR /&gt;/tmp/fpath&amp;gt;./Main&lt;BR /&gt;current PATH=/usr/bin:/usr/sbin&lt;BR /&gt;In called&lt;BR /&gt;&lt;BR /&gt;/tmp/fpath&amp;gt;export PATH=/tmp:${PATH}&lt;BR /&gt;/tmp/fpath&amp;gt;./Main&lt;BR /&gt;current PATH=/tmp:/usr/bin:/usr/sbin&lt;BR /&gt;In called&lt;BR /&gt;/tmp/fpath&amp;gt;cd ..&lt;BR /&gt;/tmp&amp;gt;fpath/Main&lt;BR /&gt;current PATH=/tmp:/usr/bin:/usr/sbin&lt;BR /&gt;In called&lt;BR /&gt;/tmp&amp;gt;cd fpath&lt;BR /&gt;&lt;BR /&gt;/tmp/fpath&amp;gt;export PATH=:${PATH}&lt;BR /&gt;/tmp/fpath&amp;gt;./Main&lt;BR /&gt;current PATH=:/tmp:/usr/bin:/usr/sbin&lt;BR /&gt;/tmp/fpath&amp;gt;cd ..&lt;BR /&gt;/tmp&amp;gt;fpath/Main&lt;BR /&gt;current PATH=:/tmp:/usr/bin:/usr/sbin&lt;BR /&gt;In called&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Apr 2005 09:26:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fpath-and-null-entry-in-path/m-p/3524930#M701375</guid>
      <dc:creator>Steve Cameron_1</dc:creator>
      <dc:date>2005-04-14T09:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: fpath and null entry in $PATH</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fpath-and-null-entry-in-path/m-p/3524931#M701376</link>
      <description>Hi Steve,&lt;BR /&gt;&lt;BR /&gt;Looks OK to me! &lt;BR /&gt;What do you want to accomplish?&lt;BR /&gt;Maybe this link helps: &lt;A href="http://www.unix.org.ua/orelly/unix/ksh/ch10_02.htm" target="_blank"&gt;http://www.unix.org.ua/orelly/unix/ksh/ch10_02.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope it helps,&lt;BR /&gt;&lt;BR /&gt;Renarios</description>
      <pubDate>Thu, 14 Apr 2005 09:58:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fpath-and-null-entry-in-path/m-p/3524931#M701376</guid>
      <dc:creator>renarios</dc:creator>
      <dc:date>2005-04-14T09:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: fpath and null entry in $PATH</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/fpath-and-null-entry-in-path/m-p/3524932#M701377</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;i'm not sure, but seems to me that the problem comes from a null path in PATH variable acting as a . (dot), the current directory.&lt;BR /&gt;&lt;BR /&gt;I mean that if you have /tmp/fpath in your PATH  environment the file /tpm/fpath/Called is executed when you call the function Called. In this way the function is never executed.&lt;BR /&gt;&lt;BR /&gt;Using the FPATH variable from the autoload function mechanism of the shell means, instead, do the sourcing of the file Called and exec the function Called&lt;BR /&gt;&lt;BR /&gt;Hope this helps</description>
      <pubDate>Tue, 19 Apr 2005 16:21:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/fpath-and-null-entry-in-path/m-p/3524932#M701377</guid>
      <dc:creator>Cesare Salvioni</dc:creator>
      <dc:date>2005-04-19T16:21:51Z</dc:date>
    </item>
  </channel>
</rss>

