![]() |
1
5
您正在中打开一个子shell
在进入while循环之前请尝试:
或者将循环更改为不使用子shell。
|
|
2
0
试着这样做: tail -n 0 -f output.err | grep --line-buffered "Exception" | while read line do echo "An exception has been detected!" | mail -s "ALERT" monitor@company.com kill -term `ps ax | grep tail | grep output.err | awk '{print $1}'` done
|