piping added and resolved the conflicts

This commit is contained in:
pv2k 2016-10-16 16:24:16 +05:30
commit 80123d312d

37
pert
View file

@ -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