ack outputs nothing using crontab in linux.
In the crontab file (edited with sudo crontab -e): 39 20 * * * /ext/test110.sh And cat /ext/test110.sh will show #! /bin/sh /usr/bin/ack "localhost" /etc/hosts > /ext/1.t which ack > /ext/2.t After cron, there are 1.t and 2.t in /ext cat 2.t will output /usr/bin/ack; However, nothing in 1.t. If I run ack "localhost" /etc/hosts > /ext/3.t in bash (4.3.30) or sh directly, it will output: 127.0.0.1 localhost It seems ack <https://beyondgrep.com/> cannot work with cron. where is the bug? BTW, grep works on this situation. Thank you. uname -a: Linux xxx 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux ack --version : ack 2.14, Running under Perl 5.20.2 at /usr/bin/perl Thank you. -- 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.
