Skip to content

Instantly share code, notes, and snippets.

@letsjustfixit
Created November 27, 2017 15:42
Show Gist options
  • Save letsjustfixit/ace3350fa2bbd507344c47264a0101cc to your computer and use it in GitHub Desktop.
Save letsjustfixit/ace3350fa2bbd507344c47264a0101cc to your computer and use it in GitHub Desktop.
Opre, sum
#!/bin/bash
sum=0
for i in "$@"
do
echo $i
sum=`expr $sum + $i`
#sum=$(( $sum + $i ))
done
echo "SUM:$sum"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment