bash script not running in nohup but working fine as stand alone

This question already has an answer here:

  • Getting the source directory of a Bash script from within 50 answers

  • You may try "source ./abc.config" just to make sure is looking into the same folder.

    --Or, depending of the complexity of executing mode/environment--

    before sourcing you may detect the folder the script is running into, store that into a variable and use it as a prefix to your abc.config like

    DIRN=`dirname $0`
    source $DIRN/abc.config
    
    链接地址: http://www.djcxy.com/p/9758.html

    上一篇: bash shell将当前文件的路径存储为变量?

    下一篇: bash脚本不在nohup中运行,但可以独立运行