How to print in linux/unix bash the number of days since a specific date till now? (for example days since 23rd of June 2009 till today)!
Linux – Days since a specific date
bashlinuxmac-osxterminalunix
Related Topic
- Bash – How to get the current Unix time in milliseconds in Bash
- Linux – Unix/Linux simple log parser (since, until)
- Linux – Calculate Days Since 1/1/1970
- Bash – extract information from a log file
- Linux – High Server Crash Rates During Leap Second Day
- Linux – How to rsync files / folders from a specific date forward
Best Answer
You can use something like this:
This assumes date2 is more recent than date1.
Adapted from http://www.unix.com/tips-tutorials/31944-simple-date-time-calulation-bash.html.