Re: how bash run by crontab is different from login bash shell?
From:
Greg Wooledge
Subject:
Re: how bash run by crontab is different from login bash shell?
Date:
Fri, 11 Sep 2020 07:44:08 -0400
User-agent:
Mutt/1.10.1 (2018-07-13)
On Thu, Sep 10, 2020 at 07:20:37PM -0400, Lawrence Velázquez wrote:
> > On Sep 9, 2020, at 9:05 PM, Peng Yu <pengyu.ut@gmail.com> wrote:
> >
> > Hi,
> >
> > I have the following line in crontab.
> >
> > * * * * * LANG=en_US.UTF-8 /usr/local/bin/bash -c 'builtin enable -f
> > /Users/xxx/Downloads/bash-5.0/examples/loadables/realpath realpath'
> >> /tmp/crontab_stdout_realpath.log 2>/tmp/crontab_stderr_realpath.log
>
> Am I missing something? Doesn't enabling a loadable and immediately
> exiting do effectively nothing?
Asking Peng Yu for their goal has never worked in the entire history
of bug-bash and help-bash, so I stopped even trying. I won't tell you
to give up, but I'm giving you fair warning that on this road there
is only frustration.
As near as I can tell, the only things that cron job will accomplish are
wasting a lot of CPU, and spamming the system log files. It'll also
probably ensure that bash and this nonstandard-location loadable builtin
are both retained in the file cache forever.
Then again, the cron job is obviously censored, so who knows what other
misinformation Peng Yu is feeding you....