Sep 21, 2018

[HDGEM] How to read array from stdin and sum them in Bash

read vs

arrIN=(${vs// / })

for i in "${arrIN[@]}"
do

 let s+=i

done
echo $s



--
Posted By Blogger to HDGEM at 6/10/2017 05:49:00 PM