Lau*_*rez 17 bash scripts
如果我有脚本“script1.sh”并且我想让它打印自己的 PID 作为第一步。我怎样才能在 bash 中做到这一点?
NGR*_*des 24
当前运行脚本的PID是 $$
$$
http://www.gnu.org/software/bash/manual/bashref.html#index-_0024_0024
( $$) 扩展到 shell 的进程 ID。在()子shell 中,它扩展为调用shell 的进程ID,而不是子shell。
()
归档时间:
10 年,6 月 前
查看次数:
4166 次
最近记录:
10 年,5 月 前