bsh project
This commit is contained in:
3
tests/subshells/basic.sh
Normal file
3
tests/subshells/basic.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
a=21
|
||||
(echo $a; a=42; echo $a)
|
||||
echo $a
|
||||
7
tests/subshells/fun_in_subshell.sh
Normal file
7
tests/subshells/fun_in_subshell.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
fun()
|
||||
{
|
||||
echo "First fun"
|
||||
}
|
||||
|
||||
(fun; fun() { echo "Second fun"; }; fun;)
|
||||
fun;
|
||||
9
tests/subshells/multiple_variables.sh
Normal file
9
tests/subshells/multiple_variables.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
a=12
|
||||
b=13
|
||||
c=14
|
||||
d=15
|
||||
e=16
|
||||
|
||||
echo "$a $b $c $d $e"
|
||||
(echo "$a $b $c $d $e"; a=21; c=41; e=61; echo "$a $b $c $d $e";)
|
||||
echo "$a $b $c $d $e";
|
||||
3
tests/subshells/subshell_in_subshell.sh
Normal file
3
tests/subshells/subshell_in_subshell.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
a=12
|
||||
(echo $a; a=13; (echo $a; a=42; echo $a); echo $a)
|
||||
echo $a
|
||||
Reference in New Issue
Block a user