bsh project
This commit is contained in:
4
tests/for/basic.sh
Executable file
4
tests/for/basic.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
for i in salut test
|
||||
do
|
||||
echo $i
|
||||
done
|
||||
9
tests/for/for_in_for.sh
Normal file
9
tests/for/for_in_for.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
for i in salut mec
|
||||
do
|
||||
echo -n "$i "
|
||||
for j in "bonjour" toi
|
||||
do
|
||||
echo -n $j
|
||||
done
|
||||
echo
|
||||
done
|
||||
6
tests/for/for_in_variables.sh
Normal file
6
tests/for/for_in_variables.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
a=bonjour
|
||||
b="encore un mot"
|
||||
for i in $a $b
|
||||
do
|
||||
echo $i
|
||||
done
|
||||
3
tests/for/mixed.sh
Normal file
3
tests/for/mixed.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
for i in salut toi je suis un for genial; do
|
||||
echo $i
|
||||
done
|
||||
13
tests/for/multiple.sh
Normal file
13
tests/for/multiple.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
for a in arg1 arg2 arg3
|
||||
do
|
||||
echo $a
|
||||
done
|
||||
|
||||
for a in a b c d e f g
|
||||
do
|
||||
echo $a
|
||||
done
|
||||
|
||||
for g in in for while; do
|
||||
echo $g
|
||||
done
|
||||
8
tests/for/no_args_no_in.sh
Executable file
8
tests/for/no_args_no_in.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
for salut
|
||||
do
|
||||
echo $salut
|
||||
done
|
||||
echo $?
|
||||
echo $#
|
||||
echo $@
|
||||
echo $*
|
||||
Reference in New Issue
Block a user