Bash 输入参数$$.sh脚本

Bash 输入参数$$.sh脚本,bash,input,parameters,Bash,Input,Parameters,我想问一下,$$在.sh脚本中的含义是什么。 我的节目: #!/bin/sh V1=$1 V2=$2 V3=$$ echo "$V1 $V2 $V3" 呼叫: ./mypro.sh 12 3 输出: 17215是bash进程的pid。$$是bash进程的pid。$$是bash进程的pid。来自bash手册页部分的特殊参数: #!/bin/sh V1=$1 V2=$2 V3=$$ echo "$V1 $V2 $V3" $扩展为shell的进程ID。在()子shell中,它扩展到当前sh


我想问一下,$$在.sh脚本中的含义是什么。
我的节目

#!/bin/sh

V1=$1
V2=$2
V3=$$

echo "$V1 $V2 $V3"
呼叫
./mypro.sh 12 3

输出

17215是bash进程的pid。

$$
是bash进程的pid。

$$
是bash进程的pid。

来自bash手册页部分的特殊参数

#!/bin/sh

V1=$1
V2=$2
V3=$$

echo "$V1 $V2 $V3"
$扩展为shell的进程ID。在()子shell中,它扩展到当前shell的进程ID,而不是子shell


从bash手册页部分特殊参数

#!/bin/sh

V1=$1
V2=$2
V3=$$

echo "$V1 $V2 $V3"
$扩展为shell的进程ID。在()子shell中,它扩展到当前shell的进程ID,而不是子shell