Find the path of a shell command [POSTPONED]

Barry barry at barrys-emacs.org
Sun Oct 16 12:21:03 EDT 2022



> On 16 Oct 2022, at 04:53, Dan Stromberg <drsalists at gmail.com> wrote:
> 
> On Wed, Oct 12, 2022 at 9:57 PM Cameron Simpson <cs at cskk.id.au> wrote:
> 
>>> 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.
>> 
> 
> Careful.  On some systems if someone restarts the cron daemon, it could
> pick up a larger environment than after being started on boot.

That have to a old system that does not use systemd.
Is there a specific system that still does this?

Barry

> -- 
> https://mail.python.org/mailman/listinfo/python-list
> 



More information about the Python-list mailing list