vendredi 16 janvier 2015

Does ksh88 interpret a number as decimal using 10#n syntax?


I would like to treat a number with leading zero as a decimal with the least effort so I intend to use the following syntax:



x=08
y=$(( 10#$x - 1 ))


Will the following syntax work on ksh88?



Aucun commentaire:

Enregistrer un commentaire