擅长:python、mysql、java
<p>如果要从shell控制此操作,请在后台启动python脚本,休眠一段时间,然后终止后台进程:</p>
<pre><code># a sample command that generates some output
{ while :; do date; sleep 1; done; } &
# let it run for a while, see if it's still running, and kill it if it is
sleep 10 && kill -0 $! 2>/dev/null && kill $!
</code></pre>