27 lines
413 B
Bash
27 lines
413 B
Bash
|
#!/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
|
||
|
|