info_tfgrid/books/manual/scripts/calculate_cloud_pricing.sh

29 lines
718 B
Bash
Raw Permalink Normal View History

2024-04-16 19:52:15 +00:00
#!/usr/bin/env bash
cd ../../collections/manual/values
value=$(cat tft_value.md)
2024-04-17 17:20:17 +00:00
CU=$(cat cu_musd_hour.md)
2024-04-16 19:52:15 +00:00
CUTFT=$(echo "$CU / $value" | bc -l)
2024-04-17 17:20:17 +00:00
printf "%.2f" $CUTFT > cu_mtft_hour.md
2024-04-16 19:52:15 +00:00
2024-04-17 17:20:17 +00:00
SU=$(cat su_musd_hour.md)
2024-04-16 19:52:15 +00:00
SUTFT=$(echo "$SU / $value" | bc -l)
2024-04-17 17:20:17 +00:00
printf "%.2f" $SUTFT > su_mtft_hour.md
2024-04-16 19:52:15 +00:00
2024-04-17 17:20:17 +00:00
NU=$(cat nu_musd_hour.md)
2024-04-16 19:52:15 +00:00
NUTFT=$(echo "$NU / $value" | bc -l)
2024-04-17 17:20:17 +00:00
printf "%.2f" $NUTFT > nu_mtft_hour.md
2024-04-16 19:52:15 +00:00
2024-04-17 17:20:17 +00:00
IP=$(cat ip_musd_hour.md)
2024-04-16 19:52:15 +00:00
IPTFT=$(echo "$IP / $value" | bc -l)
2024-04-17 17:20:17 +00:00
printf "%.2f" $IPTFT > ip_mtft_hour.md
2024-04-16 19:52:15 +00:00
2024-04-17 17:20:17 +00:00
NAME=$(cat name_musd_hour.md)
2024-04-16 19:52:15 +00:00
NAME=$(echo "$NAME / $value" | bc -l)
2024-04-17 17:20:17 +00:00
printf "%.2f" $NAME > name_mtft_hour.md
2024-04-16 19:52:15 +00:00
2024-04-17 17:20:17 +00:00
DNAME=$(cat dname_musd_hour.md)
2024-04-16 19:52:15 +00:00
DNAME=$(echo "$DNAME / $value" | bc -l)
2024-04-17 17:20:17 +00:00
printf "%.2f" $DNAME > dname_mtft_hour.md