[英]Is there a difference between executing a bash script and doing it manually?
[英]bash script not doing as a cron, but manually
手动执行时,脚本本身运行良好。 它在 cron 作业中失败了
function ban_this {
while IFS= read -r line
do
printf $line >> /tmp/test.file
done < <(printf '%s\n' "$a")
}
a=$(journalctl | grep "client @")
ban_this
function ban_this {
printf %s "$a" |
while IFS= read -r line; do
echo "$line"
done
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.