From themadcellist at gmail.com Sat May 12 14:28:24 2007 From: themadcellist at gmail.com (Paul Swanson) Date: Sat May 12 14:28:29 2007 Subject: [Uaflug] I wrote a script Message-ID: <6f5baa7a0705121528h4019f553pf7d9f9d72217d353@mail.gmail.com> Hooray! I made a little bash script to tell me the difference between two days in Linux. It takes the one or two dates, converts them into seconds, subtracts them, divides by the number of seconds in a day, then prints it out. Why? Because I need to figure this out regularly, and I'm too lazy to count. And because I'm done with finals and bored. wget http://modzer0.cs.uaf.edu/~dev2c/daysapart.sh chmod +x daysapart.sh ./daysapart.sh Usage: ./daysapart.sh date1 [date2] Standard date format (mm/dd/yy) Omitting second date defaults to present date You may omit years ./daysapart.sh 3/6 5/12 # How many days have I been 21? 66 days apart ./daysapart.sh 3/6/86 # How many days old am I? 7736 days apart -Paul