Find the path of a shell command [POSTPONED]

Cameron Simpson cs at cskk.id.au
Thu Oct 13 00:56:32 EDT 2022


On 13Oct2022 03:25, Paulo da Silva <p_d_a_s_i_l_v_a_ns at nonetnoaddress.pt> wrote:
>There is another problem involved. The script, works fine except when 
>launched by cron! Why?

Record the script output:

     # record all output
     exec >/tmp/script.$$.out 2>&1
     # dump the envionment
     env | sort
     # turn on execution tracing
     set -x
     ... rest of the script

and have a look afterwards. Cron's environment is very minimal. This 
will show you what's in it.

Cheers,
Cameron Simpson <cs at cskk.id.au>


More information about the Python-list mailing list