TOTP is Time-based One Time Password. Most people use applications on their phone for TOTP, such as andOTP, Google Authenticator, and related apps. But, as we move from using a phone as a second factor for what we are doing on a computer to a phone being the primary way we interact with the Internet, … Continue reading bash: TOTP From the Terminal With oathtool
Category: code
bash: Number of Days Between Today and Some Future Date
#!/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
