#!/bin/bash printf -v date '%(%Y-%m-%d)T\n' -1 echo $(( ($(date -d $1 +%s) - $(date -d $date +%s)) / 86400 )) days Above is a bash script to output the number of days between today and some future date. Copy it into a file, e.g., diffdate.sh, into a directory, e.g., ~/bin/scripts. Then, enter the directory you … Continue reading bash: Number of Days Between Today and Some Future Date
Tag: bash
Easiest Guide to .bashrc
"Digesting the syntax and logic of how a bash program is structured has always been an issue. I hope this will make people’s lives a bit easier and make bash a bit more straight forward."-Olafur Palsson, "Easiest Guide to .bashrc" itnext.io. February 7, 2021.
