software et al: odds & ends or bag of tricks
i'm populating this site with pieces of code, tips, notes, ...
any feedback will be greatly appreciated!
2007/06/03
shell: expresiones aritmeticas
Hay dos posibilidades, utilizar el operador aritmetico $(()):
i=1
i=$(($i+1))
echo $i
o bien el comando shell 'expr':
i=1
i=`expr $i + 1`
echo $i
AH
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment