다음은 명령 프롬프트에서 예상대로 작동합니다. 그러나 cron에서는 작동하지 않습니다.
mysqldumpslow <(tail -1000 `mysqladmin variables \
| grep slow_query_log_file | awk '{print $4}'`) \
| mail -s "slow log from `hostname` sorted by time" shantanu.oak`hostname`@gmail.com \
> /root/slow_succ.txt 2> /root/slow_err.txt
다음과 같은 오류가 발생합니다.
/bin/sh: -c: line 0: syntax error near unexpected token `('
cron에서 특정 문자를 이스케이프해야합니까? 또는 cron의 서브 쉘에 문제가 있습니까?
serverfault.com/questions/274475/의 중복 ?
—
Hubbitus