[wplug] cross scripting question
Poyner, Brandon
bpoyner at ccac.edu
Wed Aug 3 08:30:28 EDT 2005
It can be done...
$ uname
Linux
$ date
Wed Aug 3 08:29:21 EDT 2005
$ date --date="-1 day" +%Y-%m-%d
2005-08-02
Brandon Poyner
Network Engineer III
CCAC - College Office
412-237-3086
> -----Original Message-----
> From: wplug-bounces+bpoyner=ccac.edu at wplug.org
> [mailto:wplug-bounces+bpoyner=ccac.edu at wplug.org] On Behalf
> Of Tom Rhodes
> Sent: Tuesday, August 02, 2005 9:44 PM
> To: wplug at wplug.org
> Subject: [wplug] cross scripting question
>
> Hi,
>
> I'm working on a backup script to be implemented in Solaris,
> Linux, and FreeBSD environments. Now I have some problems with
> the version of Linux date(1). It doesn't seem to comply with
> POSIX and requires a completely different format then that of
> ISO 8601. Basically, what I need is a way to output the date
> subtract one day. Is there an easy way to do this on Linux?
>
> I need to print the date in the following format:
>
> 2005-08-02
>
> But I want to subtract one day from that (so that the filename
> is one day before the check).
>
> Any help would be great ... otherwise, guess I could use some
> awk(1) and sed(1) magic here. :(
>
> --
> Tom Rhodes
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
>
More information about the wplug
mailing list