我可以帮您进行翻译。以下是需要翻译的内容:
我在crontab中设置了一个任务,每2小时运行一次,并且我想将我的bash输出日志文件保存到一个单独的文件中。
输入:
0 0-23/2 * * * /tmp/sample.sh | tee /tmp/logfile_extract_$(date '+%Y-%m-%d-%H').txt
输出:
/bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file