Displaying every date since 2007

Hi,

I need to write a script that displays every date from 01/01/2007 to 03/31/2010 in the format mm/dd/yyyy. There doesn't seem to be a "datecalc" command on my system. Any inputs?

Thanks,

Maybe this can help a little:

see post #9, you may then adapt it & see if it fits

1 Like

Thanks a lot for your reply. That post is very interesting. What does the "+3" in "tail +3" stand for?

see the difference :

# cal 5 2011
   May 2011
 S  M Tu  W Th  F  S
 1  2  3  4  5  6  7
 8  9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31

# cal 5 2011 | tail +3
 1  2  3  4  5  6  7
 8  9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31

#

In some OS the -n option is mandatory (tail -n +3)

  • tail from the end
    + tail from the top
man tail
1 Like

datecalc is a script that I wrote and it's available here.