<?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 problem in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713104#M103554</link>
    <description>first test is not a good name for the script. test is built in command for most of the shells.&lt;BR /&gt;Do following to know what exactly you will be executing.&lt;BR /&gt;&lt;BR /&gt;type test&lt;BR /&gt;&lt;BR /&gt;If you want to execute yout script names test, give full path when starting it.&lt;BR /&gt;&lt;BR /&gt;/some_dir/some_dir/test</description>
    <pubDate>Fri, 20 Jan 2006 05:00:12 GMT</pubDate>
    <dc:creator>RAC_1</dc:creator>
    <dc:date>2006-01-20T05:00:12Z</dc:date>
    <item>
      <title>script problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713092#M103542</link>
      <description>Hi Guys,&lt;BR /&gt;when i create a script name is "test", after creation when i run the script, it always run ./test. please tell me why i need to give ./ for running. i am a root user and created thru root user.</description>
      <pubDate>Thu, 19 Jan 2006 06:56:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713092#M103542</guid>
      <dc:creator>hp-ux_2</dc:creator>
      <dc:date>2006-01-19T06:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713093#M103543</link>
      <description>Becuse your script is not in the execution path.&lt;BR /&gt;You either copy your script "test" in /usr/bin or add path of your test script to PATH.&lt;BR /&gt;&lt;BR /&gt;# export PATH=$PATH:&lt;TESTSCRIPTPATH&gt;&lt;BR /&gt;&lt;BR /&gt;This way you don't have to specify ./&lt;BR /&gt;&lt;BR /&gt;Hope that helps.&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;/TESTSCRIPTPATH&gt;</description>
      <pubDate>Thu, 19 Jan 2006 06:59:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713093#M103543</guid>
      <dc:creator>Bharat Katkar</dc:creator>
      <dc:date>2006-01-19T06:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713094#M103544</link>
      <description>Check your path:  "echo $PATH"&lt;BR /&gt;&lt;BR /&gt;Most likely $PATH does not contain "." (your home directory).  For the root user, this is deliberate, as putting "." in root's PATH is considered a security risk.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 19 Jan 2006 07:01:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713094#M103544</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2006-01-19T07:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713095#M103545</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;put it in /usr/contrib/bin or /usr/local/bin&lt;BR /&gt;&lt;BR /&gt;But then everybody can get it.&lt;BR /&gt;&lt;BR /&gt;Otherwise give it a meaningful name and use the alias command to set the short name = fullpathname&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;                        Steve Steel</description>
      <pubDate>Thu, 19 Jan 2006 07:05:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713095#M103545</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2006-01-19T07:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713096#M103546</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;when you write "test", and do not get any error message, you actually execute a (standard) program named test.&lt;BR /&gt;"test" is normally located in /usr/bin and probably in yout path; therefor you do not get errors. &lt;BR /&gt;It is of course confusing to use a name like that.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Jan 2006 07:15:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713096#M103546</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2006-01-19T07:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713097#M103547</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;If you want to start the script in the directory where it stand you need ./ to exucute ./ stand for current directory.&lt;BR /&gt;If you just want to start the script int has to stand in the directory which stand in PATH. You can see al these directory's by echo $PATH.&lt;BR /&gt;&lt;BR /&gt;p.s. please give pionts to the one who helped. try to make it 29 0f 29 instead of.&lt;BR /&gt;I have assigned points to   8  of   29  responses to my questions.</description>
      <pubDate>Thu, 19 Jan 2006 07:27:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713097#M103547</guid>
      <dc:creator>Mark Nieuwboer</dc:creator>
      <dc:date>2006-01-19T07:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713098#M103548</link>
      <description>Worse even: for some shells, 'test' is a builtin. It is used before $PATH is searched.&lt;BR /&gt;&lt;BR /&gt;Another bad idea is to make 'test' an alias or a shell-function :)&lt;BR /&gt;&lt;BR /&gt;# which test&lt;BR /&gt;&lt;BR /&gt;might give you that info&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.merijn</description>
      <pubDate>Thu, 19 Jan 2006 08:02:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713098#M103548</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2006-01-19T08:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713099#M103549</link>
      <description>I was wondering why no one was mentioning what a bad name test is for a shell script until I read the so far final remark by procura.&lt;BR /&gt;This reminds me of the very amusing rants of Damian Conway in his Perl Best Practices about unintelligent, unimaginative, lazy, lousy, poor, and evil variable names ;-)</description>
      <pubDate>Thu, 19 Jan 2006 09:54:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713099#M103549</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2006-01-19T09:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713100#M103550</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;best practices:&lt;BR /&gt;&lt;BR /&gt;Always do the ./scriptname thing when testing a new script. Recall a problem I once had where scp would not work because an application venderput its own script on the path with the name scp.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 19 Jan 2006 10:52:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713100#M103550</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2006-01-19T10:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713101#M103551</link>
      <description>I will agree with the statement that "test" is not a good name for a script.  The program "test" is what "[" is linked to inside many shell scripts but sometimes the actual program test is called and if it calls your script the output will be different causing a random running of your script and a difficult to troubleshoot failure of the other script.&lt;BR /&gt;&lt;BR /&gt;When you are developing a new script you can put it in a new subdirectory and add . as the first line in your PATH variable so it will search your current working directory first.&lt;BR /&gt;&lt;BR /&gt;If in doubt use the which command to see if another program or script is in your path before the one you want.&lt;BR /&gt;&lt;BR /&gt;H&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Jan 2006 13:25:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713101#M103551</guid>
      <dc:creator>Howard Marshall</dc:creator>
      <dc:date>2006-01-19T13:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713102#M103552</link>
      <description>Oh yea.  To answer your original question, the dot slash ./ is a relative path name where the dot . represents the current working directory as returned by the pwd command.  The slash separates the directory from the filename of the script.  So, if you change to the /usr/contrib/bin directory and execute /usr/contrib/bin/gzcat it would be the equivalent of ./gzcat sense . will translate to /usr/contrib/bin</description>
      <pubDate>Thu, 19 Jan 2006 14:44:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713102#M103552</guid>
      <dc:creator>Howard Marshall</dc:creator>
      <dc:date>2006-01-19T14:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713103#M103553</link>
      <description>Hi,&lt;BR /&gt;test is a ksh command so you have to use ./ to inform the shell that you want to execute your script and not the bulldin command.&lt;BR /&gt;rename your script as test.ksh and you can simple test.ksh to invoke it (if you have . in teh PATH).&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Fri, 20 Jan 2006 04:45:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713103#M103553</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2006-01-20T04:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: script problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713104#M103554</link>
      <description>first test is not a good name for the script. test is built in command for most of the shells.&lt;BR /&gt;Do following to know what exactly you will be executing.&lt;BR /&gt;&lt;BR /&gt;type test&lt;BR /&gt;&lt;BR /&gt;If you want to execute yout script names test, give full path when starting it.&lt;BR /&gt;&lt;BR /&gt;/some_dir/some_dir/test</description>
      <pubDate>Fri, 20 Jan 2006 05:00:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-problem/m-p/3713104#M103554</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2006-01-20T05:00:12Z</dc:date>
    </item>
  </channel>
</rss>

