[script shell] commande if (?) et fin de fichier

[quote=“Lancazar”]si vous avez une solution pour que
var=$(($i-$j))

marche avec sh, pas de problème :slightly_smiling:. Tout le reste devrait passer.
[/quote]

Ça devrait marcher.

man dash:

[code] Arithmetic Expansion
Arithmetic expansion provides a mechanism for evaluating an arithmetic expression and substituting its value. The format for arith‐
metic expansion is as follows:

       $((expression))

[/code]