piping added and resolved the conflicts
This commit is contained in:
parent
3d778753a8
commit
80123d312d
1 changed files with 22 additions and 15 deletions
37
pert
37
pert
|
|
@ -67,7 +67,8 @@ function pert_table
|
||||||
total_estimate=0
|
total_estimate=0
|
||||||
total_standard_deviation=0
|
total_standard_deviation=0
|
||||||
total_variance=0
|
total_variance=0
|
||||||
for var in "$@"; do
|
time=("$@")
|
||||||
|
for var in "${time[@]}"; do
|
||||||
|
|
||||||
# counter iterator
|
# counter iterator
|
||||||
counter=$[$counter +1]
|
counter=$[$counter +1]
|
||||||
|
|
@ -146,18 +147,24 @@ function pert_table
|
||||||
|
|
||||||
|
|
||||||
# main
|
# main
|
||||||
if [ $# -eq 0 ]; then
|
if [ ! -t 0 ];then
|
||||||
_help
|
time=$(cat -)
|
||||||
exit 1
|
pert_table ${time[@]}
|
||||||
fi
|
else
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
_help
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
*help|*h)
|
*help|*h)
|
||||||
_help
|
_help
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
pert_table $@
|
|
||||||
exit 0
|
pert_table $@
|
||||||
;;
|
exit 0
|
||||||
esac
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue