(Video materials in preparation)
plus : Adds the arguments
Usage : plus <v1> <v2> ...
Version : Tue Nov 29 09:01:24 JST 2022
Edition : 1
Outputs the value v1 + v2 + v3 ... with maximum lenth of fraction
parts of arguments.
$ plus 1 2 3 4
10
$ plus 1.21 2.3459 -2.524
1.0319
By adding the exit status of each command after a pipe operation,
a sum of zero indicates no error while any other result indicates
some error.
$ comman1 | command2 | command3 | ... > result
$ [ $(plus ${PIPESTATUS[@]}) = 0 ] && exit 1