gpt4 book ai didi

python - Linux Red Hat 上的 Korn Shell 脚本

转载 作者:太空宇宙 更新时间:2023-11-04 03:38:26 24 4
gpt4 key购买 nike

我的默认 shell 是 Bash,我在目录/opt/app/IRMS 上并执行脚本/opt/app/depl/bin/runjob.sh。 Runall 存在并且是软链接(soft link)。

我收到以下错误:

[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

最佳答案

似乎 runall 是从 $PATH 开始的,而不是从当前目录 ./runall 开始的,因为/opt/app/IRMS/bin 已添加到 $PATH 中。请尝试以下操作:

  1. 启动 ksh [tidal@atlesapp002 IRMS]$ ksh

  2. 运行/opt/app/depl/bin/runjob.sh执行

    如果这没有帮助,请尝试将/opt/app/IRMS/bin 添加到 PATH,然后导出 PATH

关于python - Linux Red Hat 上的 Korn Shell 脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30732488/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com