bash - How to find the difference in days between two dates? -
a="2002-20-10"
b="2003-22-11"
how find difference in days between 2 dates?
if have gnu date, allows print representation of arbitrary date (-d option). in case convert dates seconds since epoch, subtract , divide 24*3600.
or need portable way?
Comments
Post a Comment