课程: Learning Linux Shell Scripting
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Solution: Watch a script
- [Instructor] How did you do with the challenge? The solution is to start the delay script using the backgrounder operator, the ampersand. It will reveal the delay script's PID before going to sleep. So we're gonna do a ./delay.sh, say 20 seconds and put the ampersand in there to send it to the background. There it goes, it gave us its ID, so we're gonna do ./prop.sh 25249 and it tell us it's watching that PID, any second now and there we go. We see that our delay script has woken back up with the we are awake now message and then our proc has noticed that it's terminated and say process 25249 has terminated and so, we are able to watch a script with another script.
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。