2012-12-19 24 views

回答

1

我不确定你称为“进程名称”,但在Bourne shell中,你使用shell变量$!获得后台进程的PID。例如:

sleep 1000 & 
echo "$! sleep 1000" >>/tmp/save_file.txt