Formatting dates to a specific pattern

Ivan "Rambius" Ivanov rambiusparkisanius at
Sun Aug 31 04:54:59 UTC 2008


Thank you for all of your responses.

I received earlier a private answer from another member of list. He
told me to use  the '-' sign after '%' in the date pattern of date(1)

$ date +%-m%-d%Y

This one seems to not include leading zeros and I reworked it to

$ date +%-m-%-d-%Y

to fit my needs :)


Tangra Mega Rock:

More information about the freebsd-questions mailing list