gnu-pricing
gnu-pricing copied to clipboard
better formatting of accrued costs
Uses printf
, fixed-width fields, and bc
for a better-formatted table (why aren't we charged for use of printf
and bc
?). Not tested very heavily. Formatting will break when the total or individual count reaches 10^7.
Sample:
=======================
Welcome to GNU Pricing!
=======================
Using many GNU tools now cost $0.01 per use.
This command (gcc) has been used 6 times so far.
Overall GNU command usage
command usage cost
--------- ------- ------
basename 21 $0.21
cat 48 $0.48
cp 9 $0.09
dirname 1 $0.01
echo 7 $0.07
gcc 6 $0.06
grep 144 $1.44
ln 7 $0.07
ls 14 $0.14
mkdir 27 $0.27
mv 67 $0.67
pwd 2 $0.02
rm 78 $0.78
sed 25 $0.25
uname 28 $0.28
uniq 3 $0.03
--------- ------- ------
Total 487 $4.87
Please pay the total cost at https://donate.fsf.org/