Update shellfolio.sh
This commit is contained in:
parent
37e057b7ac
commit
573e35a330
|
@ -5,7 +5,7 @@
|
||||||
minus=$(tput setaf 1)
|
minus=$(tput setaf 1)
|
||||||
plus=$(tput setaf 2)
|
plus=$(tput setaf 2)
|
||||||
neutral=$(tput sgr0)
|
neutral=$(tput sgr0)
|
||||||
colwidths="$neutral%6s %10s %10s %10s %10s %10s %10s\n"
|
colwidths="$neutral%6s %15s %8s %8s %8s %12s %12s\n"
|
||||||
total=0
|
total=0
|
||||||
|
|
||||||
colorize() {
|
colorize() {
|
||||||
|
@ -19,7 +19,7 @@ colorize() {
|
||||||
|
|
||||||
|
|
||||||
printf "${colwidths}" "Symbol" "USD" "+/- 1h" "+/- 24h" "+/- 7d" "Amount" "Value"
|
printf "${colwidths}" "Symbol" "USD" "+/- 1h" "+/- 24h" "+/- 7d" "Amount" "Value"
|
||||||
printf "${colwidths}" "------" "----------" "----------" "----------" "----------" "----------" "----------"
|
printf "${colwidths}" "------" "---------------" "--------" "--------" "--------" "------------" "------------"
|
||||||
|
|
||||||
for coin in $COINS
|
for coin in $COINS
|
||||||
do
|
do
|
||||||
|
@ -45,12 +45,12 @@ do
|
||||||
usd=$(echo "scale=2; $usd" | bc)
|
usd=$(echo "scale=2; $usd" | bc)
|
||||||
total=$(echo "scale=2; $value+$total" | bc)
|
total=$(echo "scale=2; $value+$total" | bc)
|
||||||
|
|
||||||
printf "$neutral%6s %10.2f $col1h%10s $col24h%10s $col7d%10s $neutral%10s %10.2f\n" "$symbol" "$usd" "$change1h%" "$change24h%" "$change7d%" "$amount" "$value"
|
printf "$neutral%6s %15.6f $col1h%8s $col24h%8s $col7d%8s $neutral%12s %12.2f\n" "$symbol" "$usd" "$change1h%" "$change24h%" "$change7d%" "$amount" "$value"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
printf "${colwidths}" "------" "----------" "----------" "----------" "----------" "----------" "----------"
|
printf "${colwidths}" "------" "---------------" "--------" "--------" "--------" "------------" "------------"
|
||||||
printf "%72.2f\n" "$total"
|
printf "%75.2f\n" "$total"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue