我有一個簡單的shell腳本,其也低於:啓動和監控shell腳本內處理完成
#!/usr/bin/sh
echo "starting the process which is a c++ process which does some database action for around 30 minutes"
#this below process should be run in the background
<binary name> <arg1> <arg2>
exit
現在,我要的是監控和顯示過程的狀態信息。 我不想深入瞭解它的功能。由於我知道該過程將在30分鐘內完成,因此我想向用戶展示3.3%每1分鐘完成一次,並檢查過程是否在後臺運行,最後如果過程完成,我想要顯示它已完成。
有人可以幫我嗎?
請參見[流程管理](HTTP ://mywiki.wooledge.org/ProcessManagement)。 – 2012-08-03 12:28:41