This website requires Javascript to function properly. Please go to the setting of your web browser and enable Javascript for this website.
×
Loading...
Close
Home
Share
I can do it easily with FSF's date, but I can't figure out how to do it using *BSD's date
dennis2
(Dennis)
Something like:
#!/bin/sh
s1=`date -d $1 +%s`
s2=`date -d $2 +%s`
day=$((($s2 - $s1)/3600/24))
echo "Days: " $day
(#127064@0)
Last Updated: 2001-7-10
This post has been archived. It cannot be replied.
Share
Report
Replies, comments and Discussions:
I came across this post in chinasmile. Nobody has answered his question yet. I couldn't figure out a way to do it with shell scripts, although
枫下论坛主坛
/
工作学习
/
IT技术讨论