Re: awk工具的问题呀。是有点离题 了
"Wei Jiang" <[email protected]>
| Newsgroups | gmane.comp.python.chinese |
|---|---|
| Message-ID | <[email protected]> |
check the mail from system and restart crond. 2008/1/9 jessinio liang <[email protected]>: > 脚本代码: > cat /home/jessinio/TracStat.sh > #!/bin/sh > ps aux | awk '{ > cmd = ""; > do{ > split($0,fields); > if(fields[12] == "/usr/local/bin/tracd"){ > for(i=11;i<=NF;i++){ > cmd = cmd" "fields[i]; > } > cmd = cmd "\n"; > } > }while(getline == 1) > print cmd; > exit; > }' | mail -s "trac stat(awk)" -F [email protected] > > crontab -e信息: > */1 * * * * /home/jessinio/TracStat.sh > > > > 问题: > > 为什么手动执行程序没有问题!!! > > 但是crontab执行程序时,邮件是空的!确定一点:awk接收的信息为空!!! > > why ??? > > 帮助一下 > > 3Q! > > > > > -- > 身体是革命的本钱!! > blog:http://blog.oldpai.cn > _______________________________________________ > python-chinese > Post: send [email protected] > Subscribe: send subscribe to [email protected] > Unsubscribe: send unsubscribe to [email protected] > Detail Info: http://python.cn/mailman/listinfo/python-chinese _______________________________________________ python-chinese Post: send [email protected] Subscribe: send subscribe to [email protected] Unsubscribe: send unsubscribe to [email protected] Detail Info: http://python.cn/mailman/listinfo/python-chinese