> In the crontab file (edited with sudo crontab -e):
>
So you’re running this under root’s user account. My first guess would be that
for some reason root’s pathing can’t see ack, or maybe can’t find the perl that
ack needs.
> /usr/bin/ack "localhost" /etc/hosts > /ext/1.t
You could try just invoking
/usr/bin/ack —help > /etc/1.t
and see if ack runs at all.
> It seems ack <https://beyondgrep.com/> cannot work with cron. where is the
> bug? BTW, grep works on this situation. Thank you.
>
Even without this problem, I would suggest you use grep. There’s no reason
that I see not to. ack is designed for interactive use with humans, and not at
all for shell scripts.
Andy
--
You received this message because you are subscribed to the Google Groups "ack
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/ack-users.
For more options, visit https://groups.google.com/d/optout.