gpt4 book ai didi

shell - 为什么我的 cron 工作会收到意外的 EOF?

转载 作者:行者123 更新时间:2023-12-03 09:16:29 25 4
gpt4 key购买 nike

我的 Cron 作业出现错误。我不断收到的错误是:

/bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file

这是我的代码:
mysqldump -u database_user -p']T%zw51' database > /home/site/public_html/Secure/Cron/Database_Backup/database_backup.sql

最佳答案

您可能需要逃离 %\ .%是 crontab 的一个特殊字符,它被转换为换行符,因此您的代码可能正在变成

 -p']T
zw51'

尝试:
 -p']T\%zw51'

关于shell - 为什么我的 cron 工作会收到意外的 EOF?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14468733/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com