我有手动运行良好的脚本,但在通过 cronjob 运行时没有获得所需的输出。如果脚本有任何问题,请告诉我。
#!/usr/bin/ksh
file1=$(find *-* -mtime 1)
file2=$(find *-* -mtime 2)
basefile1=$(basename $file1)
basefile2=$(basename $file2)
cd /gtxappl/Release/SCMAudit
./cmp.sh $basefile1 $basefile2 > dailyAuditChecks.txt
mailx -s "Daily Checks Report" ****@homeretailgroup.com < dailyAuditChecks.txt