bsh project

This commit is contained in:
brice.boisson
2022-02-08 18:50:03 +01:00
commit 7744ceaa33
109 changed files with 9536 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
foo()
{
echo $@
echo $#
echo $2
}
foo salut je suis un argument
+9
View File
@@ -0,0 +1,9 @@
foo()
{
echo $@
}
foo arguments de la fonction
echo $@
foo "d'autres" arguments
exit 4
+6
View File
@@ -0,0 +1,6 @@
foo()
{
echo "foo"
}
foo
+8
View File
@@ -0,0 +1,8 @@
if true
then
foo() {
echo 'I am in foo function'
}
fi
foo
+11
View File
@@ -0,0 +1,11 @@
foo()
{
bar()
{
echo "bar"
echo $@
}
}
foo salut je suis un argument
bar salut
+9
View File
@@ -0,0 +1,9 @@
foo()
{
echo "this is a test"
echo $@
}
foo salut
foo
foo foo foo; foo a
+11
View File
@@ -0,0 +1,11 @@
test()
{
if $@; then
test false
else
echo end
fi
}
test true
echo "did this work ?"
+6
View File
@@ -0,0 +1,6 @@
fun() {
echo "fun"
}
echo fun
echo; fun
+11
View File
@@ -0,0 +1,11 @@
a=12
fun()
{
a=42
echo "$a"
}
echo $a
fun
echo $a