[问题] get pid in shell script

楼主: csdunhill (MR.阿花)   2016-05-25 15:31:17
请问有办法知道shell scrip里面cp指令的pid吗?
类似这样
#!/bin/sh
cp -fp xxx xxx
楼主: csdunhill (MR.阿花)   2016-05-25 17:09:00
已找到方法pgrep -P shell_pid,谢谢大家
作者: NAMESTANLY (Stanley~ New life)   2016-05-31 15:24:00
cp 放background pid用 $! (帮推文XD)

Links booklink

Contact Us: admin [ a t ] ucptt.com