<?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: Script file creation problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-file-creation-problem/m-p/3400184#M200643</link>
    <description>At some point the PATH variable is getting reset to not include the current directory.  Do test of both scenarios to capture the output from "env" and see which one has a "." in the PATH and which one does not.&lt;BR /&gt;&lt;BR /&gt;mark</description>
    <pubDate>Thu, 14 Oct 2004 11:14:21 GMT</pubDate>
    <dc:creator>Mark Greene_1</dc:creator>
    <dc:date>2004-10-14T11:14:21Z</dc:date>
    <item>
      <title>Script file creation problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-file-creation-problem/m-p/3400182#M200641</link>
      <description>I have a fairly simple problem that I seem to not be able to get figured out.  &lt;BR /&gt;I have created a simple script that displays contents of a file.  The problem I &lt;BR /&gt;am running into seems to stem from another problem I had run into before, I think.&lt;BR /&gt;&lt;BR /&gt;After I created the file I did a chmod 777 on it.  Then everytime I tried to run &lt;BR /&gt;the script, I receive "sh: scriptname: not found." But if I put a ./scriptname, it works.  &lt;BR /&gt;I decided to create a test user to see if the problem was with my user id and &lt;BR /&gt;everything worked correctly.&lt;BR /&gt;&lt;BR /&gt;The only difference I see between my actual user and my test user is the Start-Up &lt;BR /&gt;Program in SAM.&lt;BR /&gt;&lt;BR /&gt;This is where the earlier problem I ran into must be the factor.  I had to change the &lt;BR /&gt;Start-Up Program from /usr/bin/sh to /sbin/sh so I could make FTP work. I do not have &lt;BR /&gt;an /etc/ftpd/ftpusers file so I know that cannot be the problem.&lt;BR /&gt;&lt;BR /&gt;My question is this, 1) Why am I having problems running this simple script that &lt;BR /&gt;I created and 2) Do I really need the Start-Up Program to list /sbin/sh for this &lt;BR /&gt;user id to FTP?</description>
      <pubDate>Thu, 14 Oct 2004 11:03:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-file-creation-problem/m-p/3400182#M200641</guid>
      <dc:creator>David Land</dc:creator>
      <dc:date>2004-10-14T11:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Script file creation problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-file-creation-problem/m-p/3400183#M200642</link>
      <description>What do you use in your script??&lt;BR /&gt;&lt;BR /&gt;/sbin/sh or /usr/sbin/sh??&lt;BR /&gt;what are the perms on /sbin/sh&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Thu, 14 Oct 2004 11:09:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-file-creation-problem/m-p/3400183#M200642</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-10-14T11:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Script file creation problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-file-creation-problem/m-p/3400184#M200643</link>
      <description>At some point the PATH variable is getting reset to not include the current directory.  Do test of both scenarios to capture the output from "env" and see which one has a "." in the PATH and which one does not.&lt;BR /&gt;&lt;BR /&gt;mark</description>
      <pubDate>Thu, 14 Oct 2004 11:14:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-file-creation-problem/m-p/3400184#M200643</guid>
      <dc:creator>Mark Greene_1</dc:creator>
      <dc:date>2004-10-14T11:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: Script file creation problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-file-creation-problem/m-p/3400185#M200644</link>
      <description>What is the name you have given to your script? Make sure that you should not give any `commandname` to your script. &lt;BR /&gt;Because when you try to execute your script, your shell searches the PATH for the `scriptname` and if the commandâ  s PATH comes before your script's PATH, then your shell will try to execute the `command` instead of your script.&lt;BR /&gt;And that `command` must be requiring Root privileges to run(/sbin/sh is a rootâ  s shell). &lt;BR /&gt;Your script works when you give ./ that is because of the same reason. Since you specify the current directory and run your script, it does not search the PATH for the `scriptname` and runs it from the current directory.&lt;BR /&gt;&lt;BR /&gt;Please let me know whether it resolves your issue.&lt;BR /&gt;&lt;BR /&gt;Sid</description>
      <pubDate>Thu, 14 Oct 2004 11:29:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-file-creation-problem/m-p/3400185#M200644</guid>
      <dc:creator>Siddhesh</dc:creator>
      <dc:date>2004-10-14T11:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: Script file creation problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-file-creation-problem/m-p/3400186#M200645</link>
      <description>Mark, you were right.  The . was not in my users PATH statement but was in the test PATH.</description>
      <pubDate>Thu, 14 Oct 2004 11:34:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-file-creation-problem/m-p/3400186#M200645</guid>
      <dc:creator>David Land</dc:creator>
      <dc:date>2004-10-14T11:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Script file creation problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-file-creation-problem/m-p/3400187#M200646</link>
      <description>/sbin/sh should be for roots default shell. I would suggest  you to use /usr/bin/sh for ordinary users.  In anycase the problem is your initialization files, I think, check your  .profile and .login for these users, its defintely the $PATH variable which is not including "." the current directory in the 1st case (where it isnt working) and it is being included in the seocnd case where its working.&lt;BR /&gt;-Good luck&lt;BR /&gt;Govind</description>
      <pubDate>Thu, 14 Oct 2004 11:39:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-file-creation-problem/m-p/3400187#M200646</guid>
      <dc:creator>Govind_3</dc:creator>
      <dc:date>2004-10-14T11:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: Script file creation problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-file-creation-problem/m-p/3400188#M200647</link>
      <description>Last question, since the "." seemed to be the problem, what is the . actually used for?</description>
      <pubDate>Thu, 14 Oct 2004 11:40:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-file-creation-problem/m-p/3400188#M200647</guid>
      <dc:creator>David Land</dc:creator>
      <dc:date>2004-10-14T11:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Script file creation problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-file-creation-problem/m-p/3400189#M200648</link>
      <description>The "." stands for the current directory or PWD.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 14 Oct 2004 11:41:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-file-creation-problem/m-p/3400189#M200648</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2004-10-14T11:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: Script file creation problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-file-creation-problem/m-p/3400190#M200649</link>
      <description>"." is current directory, and ".." is parent directory.  If you go to somewhere like /var/spool and do an ls -la|pg, at the top of the listing you'll see them.  You can use them as an indirect directory reference, like "cd ..".&lt;BR /&gt;&lt;BR /&gt;mark</description>
      <pubDate>Thu, 14 Oct 2004 11:49:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-file-creation-problem/m-p/3400190#M200649</guid>
      <dc:creator>Mark Greene_1</dc:creator>
      <dc:date>2004-10-14T11:49:30Z</dc:date>
    </item>
  </channel>
</rss>

