exo1
This commit is contained in:
commit
4b1e5056c6
1 changed files with 26 additions and 0 deletions
26
monshell.sh
Executable file
26
monshell.sh
Executable 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
|
||||
|
Loading…
Reference in a new issue