脚本内容:
source /etc/profile
. ~/.bash_profile
#!/bin/bash
/usr/bin/esm -s "http://10.0.2.90:9200" -x "master-log-2020.05.08" -m="elastic":"461He.com" -o="/tmp/master-log-2020.05.08" >> /data/log/la.log
手动执行上面的脚本 sh xx.sh 成功导出。
但是再crontab 里面写了 sh xx.sh 没有任何报错。没有任何输出。看了不是环境变量的问题呢