[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
RE: scripting newbie has question...
- From: Eric Ladner <eladner goldinc com>
- To: redhat-list redhat com
- Subject: RE: scripting newbie has question...
- Date: Wed Jan 1 15:01:08 2003
Shorter version:
date '+Date: day=%d month=%m year=%y'
On Tue, 2002-12-31 at 06:58, Stone, Timothy wrote:
> Mike and all,
>
> Worked like a charm! Thanks!
>
> Wishing you a happy new year!
>
> Tim
>
> -----Original Message-----
> From: mklinke axsi com [mailto:mklinke axsi com]
> Sent: Monday, December 30, 2002 4:54 PM
> To: Stone, Timothy
> Subject: Re: scripting newbie has question...
>
>
> Tim,
>
> Will this help?
>
> Regards, Mike Klinke
>
>
> -------------------
> #!/bin/sh
> #
>
> DAY=`date +%d`
> MON=`date +%m`
> YEAR=`date +%y`
>
> echo "Date: day=$DAY month=$MON year=$YEAR"
>
> -------------------
>
>
>
> > Here's the simplicity of it today:
> >
> > # start ################################
> >
> > #!/bin/sh
> >
> > scp -i [key] [server0-log] [local0-log]
> > scp -i [key] [server1-log] [local1-log]
> >
> > # end ##################################
> >
> > This is run as a user cron job daily.
> >
> > The script is going to work for at least another day. Then I will
> > have to edit it and it will work for another month.
> >
> > My server logs are named dynamically as so: %Y%M_server0.log
> >
> > So the point of all this? How do I add %Y%M features to my script? I
> > don't know C, but decent with Java, so the bridge is not to far to
> > cross. I might be over thinking this and the feature is in the shell.
>
>
--
Eric Ladner <eladner goldinc com>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]