This commit is contained in:
mael 2022-10-12 08:54:31 +02:00
commit 4b1e5056c6

26
monshell.sh Executable file
View file

@ -0,0 +1,26 @@
#!/bin/bash
var1=15
var2=20
echo "Var1 : $var1"
echo "Var2 : $var2"
if [ "$var1" -gt "$var2" ]
then
echo "var1 est plus grand que var2"
else
echo "var1 est plus petit que var2"
fi
var3=$(($var1+$var2))
echo "var1+var2=$var3"
read -p "Entrer var4 : " var4
read -p "Entrer var5 : " var5
if [ $var4 -eq $var5 ]
then
echo "var4 et var5 sont identiques !"
else
echo "var4 et var5 sont différents !"
fi