Jump to content

Bash : transformer un string en integer


Recommended Posts

:byebye: oops désolé ... javais pas vu que c'était pas du C ... :fou:

hum hum

il faut mettre entre doubles parenthèses en bash ...

genre :

i=5
j=4
echo "i=$i"
echo "j=$j"

if (($i > $j))
then
echo 'vrai'
else
echo 'faux'
fi

et ça retourne :

i=5

j=4

vrai

voilà voilà ...

:chinois:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...