我的默认shell是Bash,我在目录/ opt / app / IRMS上并执行脚本/opt/app/depl/bin/runjob.sh。 Runall存在并且是一个软链接。
我收到以下错误:
[tidal@atlesapp002 IRMS]$ ksh -x /opt/app/depl/bin/runjob.sh execute
ls irms_inq.env
+ myenv=irms_inq.env
+ . ./irms_inq.env
+ . /home/tidal/cfg/setenv
+ export PATH
+ export LD_LIBRARY_PATH
+ export FPATH
+ export SQLPATH
+ PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/tidal/bin:.
+ . /home/tidal/cfg/python.env
+ PY=/opt/python
+ PATH=/opt/python/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/tidal/bin:.
+ LD_LIBRARY_PATH=:/opt/python/lib
+ . /home/tidal/cfg/svn.env
+ SVN=/opt/app/svn
+ PATH=/opt/app/svn/bin:/opt/python/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/tidal/bin:.
+ LD_LIBRARY_PATH=/opt/app/svn/lib::/opt/python/lib
+ . /home/tidal/cfg/ora.env
+ CLI=/opt/app/instantclient_11_2
+ NLS_LANG=AMERICAN_AMERICA.UTF8
+ export NLS_LANG
+ LD_LIBRARY_PATH=/opt/app/instantclient_11_2:/opt/app/svn/lib::/opt/python/lib
+ export LD_LIBRARY_PATH
+ TNS_ADMIN=/opt/app/instantclient_11_2
+ export TNS_ADMIN
+ PATH=/opt/app/svn/bin:/opt/python/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/tidal/bin:.:/opt/app/instantclient_11_2
+ export PATH
+ . /home/tidal/cfg/depl.env
+ DEPL=/opt/app/depl
+ PATH=/opt/app/svn/bin:/opt/python/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/tidal/bin:.:/opt/app/instantclient_11_2:/opt/app/depl/bin
+ FPATH=:/opt/app/depl/lib
+ SQLPATH=:/opt/app/depl/lib
+ . /home/tidal/cfg/putils.env
+ PATH=/opt/app/svn/bin:/opt/python/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/tidal/bin:.:/opt/app/instantclient_11_2:/opt/app/depl/bin:/opt/app/putils/bin
+ SQLPATH=:/opt/app/depl/lib:/opt/app/putils/lib
+ pwd
+ irmspwd=/opt/app/IRMS
+ PATH=/opt/app/svn/bin:/opt/python/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/tidal/bin:.:/opt/app/instantclient_11_2:/opt/app/depl/bin:/opt/app/putils/bin:/opt/app/IRMS/bin
+ SQLPATH=:/opt/app/depl/lib:/opt/app/putils/lib:/opt/app/IRMS/lib
+ SQLPATH=:/opt/app/depl/lib:/opt/app/putils/lib:/opt/app/IRMS/lib:/opt/app/IRMS/src
+ runall execute
/opt/app/depl/bin/runjob.sh[7]: runall: not found [No such file or directory]
[tidal@atlesapp002 IRMS]$
====
[tidal@atlesapp002 bin]$ ls -al
total 96
drwxrwxr-x 3 tidal tidal 4096 Jun 9 13:29 .
drwxrwxr-x 4 tidal tidal 4096 May 19 16:38 ..
lrwxrwxrwx 1 tidal tidal 8 Jun 8 12:56 runall -> setup.sh
-rwxr-xr-x 1 tidal tidal 2319 May 19 16:38 runall.save
-rwxr-xr-x 1 tidal tidal 831 May 19 16:38 runcp.sh
-rwxr-xr-x 1 tidal tidal 54 Jun 9 13:29 runjob.sh
-rwxr-xr-x 1 tidal tidal 2242 May 19 16:38 runsockets.pl
lrwxrwxrwx 1 tidal tidal 9 Jun 9 00:01 runsql -> runsql.sh
-rwxr-xr-x 1 tidal tidal 1877 May 19 16:38 runsql.save
-rwxr-xr-x 1 tidal tidal 1877 May 19 16:38 runsql.sh
-rwxr-xr-x 1 tidal tidal 5590 May 19 16:38 setParm.pl
-rwxr-xr-x 1 tidal tidal 2319 May 19 16:38 setup.sh
答案 0 :(得分:0)
似乎runall
从$ PATH开始,而不是从当前目录./runall
开始,因为/ opt / app / IRMS / bin已添加到$ PATH。
请尝试以下方法:
[tidal@atlesapp002 IRMS]$ ksh
运行/opt/app/depl/bin/runjob.sh execute
如果这无效,请尝试将/ opt / app / IRMS / bin添加到PATH然后导出PATH
答案 1 :(得分:0)
是的,当我将ksh添加到它运行的runall脚本时。
喜欢ksh runall
为什么?