Columnize stats output
This commit is contained in:
parent
25055bf724
commit
c12e1f5f46
11
cv
11
cv
@ -42,13 +42,19 @@ out(){
|
||||
w=10
|
||||
if [ -z $3 ]
|
||||
then
|
||||
printf "%-${w}s %-${w}s" "$1:" "$(get $2)" "+ $(expr $(get $2) - $(yget $2))"
|
||||
printf "\n"
|
||||
printf "║ %-${w}s ║ %-${w}s ║ %-${w}s ║\n" "$1:" "$(get $2)" "+ $(expr $(get $2) - $(yget $2))"
|
||||
else
|
||||
printf "%-${w}s %d\n" "$1:" "$(yget $2)"
|
||||
fi
|
||||
}
|
||||
frame(){
|
||||
case "$1" in
|
||||
up) printf "╔════════════╦════════════╦════════════╗\n" ;;
|
||||
down) printf "╚════════════╩════════════╩════════════╝\n" ;;
|
||||
esac
|
||||
}
|
||||
result(){
|
||||
frame up
|
||||
out Total cases
|
||||
out Active active
|
||||
out Critical critical
|
||||
@ -56,6 +62,7 @@ result(){
|
||||
out Deaths deaths
|
||||
out Recovered recovered
|
||||
out Tests tests
|
||||
frame down
|
||||
if [ -f "$data/$ydate-$country" ]
|
||||
then
|
||||
if [ "$(get todayCases)" == "$(yget todayCases)" ]
|
||||
|
Reference in New Issue
Block a user