( 7 months ago )
i have a script script.sh , i use 'lsof' inside it: if ! [[
lsof -c bzip2 | grep $FILEPATH ]]
the script executes successfully.
However, when i call it from another machine, ssh sameUser@remotehost /pathToScript/script.sh
script executes however, it gives error that "lsof" command not found.
also i used set -x and used exec 5>"DEBUG.out" BASH_XTRACEFD="5" in script.sh but there is no debug info