Bash – How to add integers


/ Published in: Bash
Save to your folder(s)



Copy this code and paste it in your HTML
  1. a=1
  2. b=3
  3. c=$(($a $b))
  4. echo "c=$c"

URL: http://www.notesbit.com/index.php/scripts-unix/linux-unix-shell-script-how-to-add-integers-in-bash-sample/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.