[TimLinux] Linux shell获取进程pid 调用脚本时,获取进程PID: (/this/is/a/script/file.sh > /out/to/log.txt & echo $!) & 脚本内部,获取进程PID: echo $$ echo $PPID