<?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: shell script doesn't run in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857366#M276027</link>
    <description>Hi guys!&lt;BR /&gt;&lt;BR /&gt;However, I dont get any error after starting script. It simply does nothing:&lt;BR /&gt;&lt;BR /&gt;kate:oraslp 6&amp;gt; ./R3COPY&lt;BR /&gt;kate:oraslp 7&amp;gt; &lt;BR /&gt;&lt;BR /&gt;Setting the "set -x" also didn't show any error.</description>
    <pubDate>Tue, 05 Sep 2006 22:50:50 GMT</pubDate>
    <dc:creator>Igor Sovin</dc:creator>
    <dc:date>2006-09-05T22:50:50Z</dc:date>
    <item>
      <title>shell script doesn't run</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857363#M276024</link>
      <description>Hi!&lt;BR /&gt;&lt;BR /&gt;I have priblem running script which starts with&lt;BR /&gt;#!/bin/sh.&lt;BR /&gt;When I run it as root it works fine, but it doesnt run under another user, although all permissions are set correctly.&lt;BR /&gt;&lt;BR /&gt;here is ls -l:&lt;BR /&gt;&lt;BR /&gt;kate:oraslp 7&amp;gt; ls -l&lt;BR /&gt;total 384&lt;BR /&gt;lrwxr-xr-x   1 oraslp     dba             37 Jul 20 09:49 920_64 -&amp;gt; /export/oracle/SLP/platform/HPUX-IA64&lt;BR /&gt;-rwxr-xr-x   1 oraslp     dba          33566 Sep  6 09:01 R3COPY&lt;BR /&gt;drwxr-xr-x   3 oraslp     dba           8192 Mar 11  2002 mirrlogA&lt;BR /&gt;drwxr-xr-x   3 oraslp     dba           8192 Mar 11  2002 mirrlogB&lt;BR /&gt;drwxr-xr-x   4 oraslp     dba          40960 Aug 22 08:44 oraarch&lt;BR /&gt;drwxr-xr-x   3 oraslp     dba           8192 Nov  7  2003 origlogA&lt;BR /&gt;drwxr-xr-x   3 oraslp     dba           8192 Mar 11  2002 origlogB&lt;BR /&gt;drwxr-xr-x   2 oraslp     dba           8192 Sep  5 06:00 saparch&lt;BR /&gt;drwxr-xr-x   2 oraslp     dba           8192 Sep  4 23:50 sapbackup&lt;BR /&gt;drwxr-xr-x   2 oraslp     dba           8192 Sep  5 07:02 sapcheck&lt;BR /&gt;drwxr-xr-x  18 oraslp     dba           8192 Jul 28  2004 sapdata1&lt;BR /&gt;drwxr-xr-x  27 oraslp     dba           8192 Feb 10  2005 sapdata2&lt;BR /&gt;drwxr-xr-x  42 oraslp     dba           8192 Aug 26  2004 sapdata3&lt;BR /&gt;drwxr-xr-x  40 oraslp     dba           8192 Sep 30  2005 sapdata4&lt;BR /&gt;drwxr-xr-x  26 oraslp     dba           8192 Feb 13  2006 sapdata5&lt;BR /&gt;drwxr-xr-x  14 oraslp     dba           8192 Aug 30  2004 sapdata6&lt;BR /&gt;drwxr-xr-x   3 oraslp     dba           8192 Sep  5 10:29 sapreorg&lt;BR /&gt;drwxr-xr-x   4 oraslp     dba             96 Jul 20 09:43 saptrace&lt;BR /&gt;&lt;BR /&gt;R3COPY is the script that I told about.</description>
      <pubDate>Tue, 05 Sep 2006 22:23:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857363#M276024</guid>
      <dc:creator>Igor Sovin</dc:creator>
      <dc:date>2006-09-05T22:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: shell script doesn't run</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857364#M276025</link>
      <description>First, your shebang should be /usr/bin/sh not /bin/sh. Secondly, while the permissions of the RCOPY script/program are ok (and I question if this should be executable by anybody -I would change the mode to 750 rather than 755), it's probably the permissions of some other commands/executables/files/directories within the script itself that is the problem. I would add a "set -x" near the top of the RCOPY script and that should tell you where the script is failing. This applies if R3COPY is a script; if it is a true executable then run it under TUSC to see where the error occurs.&lt;BR /&gt;&lt;BR /&gt;It really helps when you post the exact error message; otherwise, I have to use "The Force".&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Sep 2006 22:32:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857364#M276025</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-09-05T22:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: shell script doesn't run</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857365#M276026</link>
      <description>Apparently it is not a problem with the protection of the script, but with priviliges needed for an action triggered by the script.&lt;BR /&gt;&lt;BR /&gt;Are all environment variables in place before the run&lt;BR /&gt;&lt;BR /&gt;- What is the exact error message?&lt;BR /&gt;- How far does it get in the script?&lt;BR /&gt;- Run it with debug output ( -x ) ?&lt;BR /&gt;- 'diff' output form env for root and for the other user?&lt;BR /&gt;- Cut &amp;amp; paste individual commands from the script and try them?&lt;BR /&gt;&lt;BR /&gt;Sounds like the script want to copy Oracle files around. Doe the other user (oraslp?) have write privs for the target? read privs for the source?&lt;BR /&gt;&lt;BR /&gt;You can figure this one out! &lt;BR /&gt;We know you can!&lt;BR /&gt;&lt;BR /&gt;Good luck,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Sep 2006 22:35:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857365#M276026</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-09-05T22:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: shell script doesn't run</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857366#M276027</link>
      <description>Hi guys!&lt;BR /&gt;&lt;BR /&gt;However, I dont get any error after starting script. It simply does nothing:&lt;BR /&gt;&lt;BR /&gt;kate:oraslp 6&amp;gt; ./R3COPY&lt;BR /&gt;kate:oraslp 7&amp;gt; &lt;BR /&gt;&lt;BR /&gt;Setting the "set -x" also didn't show any error.</description>
      <pubDate>Tue, 05 Sep 2006 22:50:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857366#M276027</guid>
      <dc:creator>Igor Sovin</dc:creator>
      <dc:date>2006-09-05T22:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: shell script doesn't run</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857367#M276028</link>
      <description>Could you attach the script so that it can be looked at?&lt;BR /&gt;&lt;BR /&gt;thanks!</description>
      <pubDate>Tue, 05 Sep 2006 23:53:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857367#M276028</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2006-09-05T23:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: shell script doesn't run</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857368#M276029</link>
      <description>Hi!&lt;BR /&gt;&lt;BR /&gt;The script is in attachment</description>
      <pubDate>Wed, 06 Sep 2006 00:10:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857368#M276029</guid>
      <dc:creator>Igor Sovin</dc:creator>
      <dc:date>2006-09-06T00:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: shell script doesn't run</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857369#M276030</link>
      <description>I looked at your script, at first sight there&lt;BR /&gt;seems nothing out of the ordinary.&lt;BR /&gt;There are a couple of exit conditions like&lt;BR /&gt;ORACLE_HOME not set, or Oracle not available etc.. , but then you should see an error produced by the script onto your terminal.&lt;BR /&gt;&lt;BR /&gt;So the fact that you get no output at all looks like a fork or exec problem.&lt;BR /&gt;Possibly due to something in the environment&lt;BR /&gt;But in all honesty I can't explain it yet.&lt;BR /&gt;&lt;BR /&gt;When you run the script like this&lt;BR /&gt;&lt;BR /&gt;oraslp&amp;gt;sh -xv R3COPY&lt;BR /&gt;&lt;BR /&gt;You do not get any output at all ,&lt;BR /&gt;not even the verbose info?&lt;BR /&gt;&lt;BR /&gt;By the way this oraslp it is a cshell or not ? And what are your terminal settings ?&lt;BR /&gt;When you do ps -ef | grep -i R3COPY is it still in memory ? &lt;BR /&gt;&lt;BR /&gt;Hope we can move on from here.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Sep 2006 02:21:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857369#M276030</guid>
      <dc:creator>Frank de Vries</dc:creator>
      <dc:date>2006-09-06T02:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: shell script doesn't run</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857370#M276031</link>
      <description>Igor,&lt;BR /&gt;1. Are non-root users allowed by directory to run the file?&lt;BR /&gt;2. Check the shell:&lt;BR /&gt;ll /usr/bin/sh  [   -r-xr-xr-x ]?&lt;BR /&gt;3. Change your first lines:&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;echo hello&lt;BR /&gt;exit&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Sep 2006 03:03:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857370#M276031</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-09-06T03:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: shell script doesn't run</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857371#M276032</link>
      <description>Frank,&lt;BR /&gt;&lt;BR /&gt;here is the output of sh -xv:&lt;BR /&gt;&lt;BR /&gt;kate:oraslp 12&amp;gt; sh -xv R3COPY&lt;BR /&gt;#  *********************************************************************&lt;BR /&gt;# ***********************************************************************&lt;BR /&gt;# ****                                                               ****&lt;BR /&gt;# ***           $HOME/.kshrc                                          ***&lt;BR /&gt;# ***           login script for KORN-shell                           ***&lt;BR /&gt;# ***                                                                 ***&lt;BR /&gt;# ***           To facilitate Hotline Support nothing should be       ***&lt;BR /&gt;# ***           changed. If necessary site-specific modifications     ***&lt;BR /&gt;# ***           can be included in the file .customer.sh              ***&lt;BR /&gt;# ***           which will be sourced by this script. See Section :   ***&lt;BR /&gt;# ***                                                                 ***&lt;BR /&gt;# ***             # User specific environment                         ***&lt;BR /&gt;# ***                                                                 ***&lt;BR /&gt;# ***           Copyright (c) 1993 SAP-AG                             ***&lt;BR /&gt;# ***                                                                 ***&lt;BR /&gt;# ***           @(#) Version: %I%  Date %E%                     ***&lt;BR /&gt;# ***                                                                 ***&lt;BR /&gt;# ***********************************************************************&lt;BR /&gt;#  *********************************************************************&lt;BR /&gt;&lt;BR /&gt;# RDBMS environment&lt;BR /&gt;if [ -f $HOME/.dbenv_`hostname`.sh ]; then&lt;BR /&gt;     . $HOME/.dbenv_`hostname`.sh&lt;BR /&gt;elif [ -f $HOME/.dbenv.sh ]; then&lt;BR /&gt;     . $HOME/.dbenv.sh&lt;BR /&gt;fi&lt;BR /&gt;+ hostname&lt;BR /&gt;+ [ -f /oracle/SLP/.dbenv_kate.sh ]&lt;BR /&gt;+ [ -f /oracle/SLP/.dbenv.sh ]&lt;BR /&gt;&lt;BR /&gt;# 16/05/99 Assa added for Backup OmniBack &lt;BR /&gt;OB2BARLIST=SLP&lt;BR /&gt;+ OB2BARLIST=SLP&lt;BR /&gt;export OB2BARLIST&lt;BR /&gt;+ export OB2BARLIST&lt;BR /&gt;&lt;BR /&gt;# User specific environment&lt;BR /&gt;if [ -f $HOME/.customer.sh ]; then&lt;BR /&gt;     . $HOME/.customer.sh&lt;BR /&gt;fi&lt;BR /&gt;+ [ -f /oracle/SLP/.customer.sh ]&lt;BR /&gt;&lt;BR /&gt;# Say good bye for non interactive shells&lt;BR /&gt;case $- in&lt;BR /&gt; *i*);;&lt;BR /&gt; *) return 0;;&lt;BR /&gt;esac&lt;BR /&gt;+ return 0&lt;BR /&gt;kate:oraslp 13&amp;gt; &lt;BR /&gt;&lt;BR /&gt;oraslp is a cshell user.&lt;BR /&gt;ps -ef |grep -i R3COPY shows that process not in memory.&lt;BR /&gt;&lt;BR /&gt;Peter,&lt;BR /&gt;1)Permissions on /usr/bin/sh is correct&lt;BR /&gt;2) After changing first lines i see "hello" in the output, it work fine.&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Sep 2006 03:13:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857371#M276032</guid>
      <dc:creator>Igor Sovin</dc:creator>
      <dc:date>2006-09-06T03:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: shell script doesn't run</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857372#M276033</link>
      <description>Ah, we can see now where and why it exits.&lt;BR /&gt;&lt;BR /&gt;It says that no option was passed to the ksh shell and exits.&lt;BR /&gt;&lt;BR /&gt;Before you run the script,&lt;BR /&gt;can you first type ksh &lt;BR /&gt;at your cshell prompt of oraslp.&lt;BR /&gt;And then run the script again.&lt;BR /&gt;&lt;BR /&gt;Let me know if that does it, &lt;BR /&gt;Also in combination with the ksh shell you can change the first line in your script to #!/sbin/ksh &lt;BR /&gt;&lt;BR /&gt;If this does not work I need to do some research on this interactive shell thing; but we are getting closer :) :)&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Sep 2006 02:13:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857372#M276033</guid>
      <dc:creator>Frank de Vries</dc:creator>
      <dc:date>2006-09-07T02:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: shell script doesn't run</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857373#M276034</link>
      <description>Okay&lt;BR /&gt;&lt;BR /&gt;kate:oraslp 3&amp;gt; ksh&lt;BR /&gt;kate:oraslp&amp;gt; ./R3COPY&lt;BR /&gt;kate:oraslp&amp;gt; &lt;BR /&gt;&lt;BR /&gt;Unfortunetly no result.</description>
      <pubDate>Thu, 07 Sep 2006 04:54:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857373#M276034</guid>
      <dc:creator>Igor Sovin</dc:creator>
      <dc:date>2006-09-07T04:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: shell script doesn't run</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857374#M276035</link>
      <description>but it runs when I change the first line in my script to #!/usr/bin/ksh&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Sep 2006 04:59:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857374#M276035</guid>
      <dc:creator>Igor Sovin</dc:creator>
      <dc:date>2006-09-07T04:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: shell script doesn't run</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857375#M276036</link>
      <description>It's important to know why /usr/bin is the correct location. In HP-UX (and other SysV Unix flavors like Solaris), the /bin directory no longer exists. To verify this, type the command:&lt;BR /&gt; &lt;BR /&gt;ls -ld /bin&lt;BR /&gt; &lt;BR /&gt;It is not a directory but a temporary link so script writers can change their interpreter line (#!/usr/bin...). Linux and other BSD versions still use /bin so it is important to remember the differences. /bin has not existed for more than 10 years in HP-UX.&lt;BR /&gt; &lt;BR /&gt;Since the set -x did not work, the script did not run. The alternate method is to to place the -x trace on the command line as in:&lt;BR /&gt; &lt;BR /&gt;ksh -x ./R3COPY</description>
      <pubDate>Thu, 07 Sep 2006 19:40:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-doesn-t-run/m-p/3857375#M276036</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2006-09-07T19:40:51Z</dc:date>
    </item>
  </channel>
</rss>

