[ ]
[[ ]]
test
(a=123;echo 123) #()会生成一个子shell
{ a=123;echo 123; } #在当前shell
read var
read -p "please input: " name
read -sp "please inupt passwd: " passwd
read name arg
[ ]
[[ ]]
test
(a=123;echo 123) #()会生成一个子shell
{ a=123;echo 123; } #在当前shell
read var
read -p "please input: " name
read -sp "please inupt passwd: " passwd
read name arg