Shell Script for the #100DaysToOffload Challenge
September 6, 2023
#100DaysToOffload
#Script
I am getting quite close to my 1-year mark since I started the #100DaysToOffload challenge. Some quick mafs tell me that I can’t skip that many days if I want to make it to 100 blog posts by the end of the 365 days.
I wrote a script that takes the date when I made my first #100DaysToOffload blog post and the number of blog posts I have written through for challenge so far. The script then calculates some numbers to… motivate.

Here’s the script:
| |
Some interesting things that I learned while preparing this script include:
- The use of
date -dto work on a specific date. For exampledate -d 2023-09-03 +%swill print the given date as seconds since epoch. - The use of
exprfor some of the maths. - The use of
bcfor floating-point maths (whichexprdoesn’t support). - The use of
tputto get the right sequences for formatting texts (that is how we are making some of the output text bold).
This post is 35th of my #100DaysToOffload challenge. Want to get involved? Find out more at 100daystooffload.com.
comments powered by Disqus
Similar Blog Posts
December 5, 2022
#100DaysToOffload
#CalVer
#Git
+2
September 3, 2023
#100DaysToOffload
#Milestone