Jun 10, 2017

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

read vs

arrIN=(${vs// / })

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

 let s+=i

echo $s

Posted By Blogger to HDGEM at 6/10/2017 05:49:00 PM
Post a Comment

Featured Post

Modern tar recognizes the file format

One command works with any supported compression method. tar xf archive.tar.xz tar xf archive.tar.gz tar xf archive.tar etc. ...