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:


s1=`date -d $1 +%s`
s2=`date -d $2 +%s`
day=$((($s2 - $s1)/3600/24))
echo "Days: " $day
2001-7-10 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: 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

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论