[TriLUG] OT: bash scripting question

Jon Carnes jonc at nc.rr.com
Wed Jun 25 14:40:08 EDT 2003


On Wed, 2003-06-25 at 13:17, Chris Knowles wrote:
> I do have a question... date -d "yesterday" and date -d "tomorrow"
> works, but what's the right way to generate a date 1 week ago,

date -d "-1 week"

>  or an
> arbitrary date? (30 days ago, 45 days ago, 10 days from now, etc)

date -d "-30 days", date -d "-45 days", date -d "+10 days"

HtH - Jon




More information about the TriLUG mailing list