[nflug] bash scripting

Robert Stockdale IV bobstockdale at gmail.com
Sat Aug 25 17:01:05 EDT 2007


Thank you. This is exactly what I was trying to do. In fact I was almost
there. Had everything except the backticks. Now I just got to set up the
cron job so it gets done everyday M-F. Thanks again.
Bob

On 8/25/07, Tony E - Jaraeth <jaraeth at phoenixwing.com> wrote:
>
> For archiving files, as an example, I usually us something like:
>
>   mv filename.tgz filename.`date +%Y%m%d`.tgz
>
> Hope that helps,
>
> ~ Tony E
>
>
>
> Robert Stockdale IV wrote:
> > Hi All:
> > I'm a bit rusty at scripting. I've only done a little in the past. What
> > I am trying to do is create a file name with the date as part of the
> > name. Such as tnt082507.pdf (tnt'mmddyy'.pdf). I did this about 20 years
> > ago in MS-DOS. I'm planning to setup a cron job to retrieve a file from
> > the web using wget. The file always has the same name and I don't want
> > to overwrite the previous days file. I'd like to save them in a dated
> > filename with a mv command in a specified directory. How can I
> > concatenate the system date as specified to create unique filenames for
> > each days file?
> > Thank you.
> > Bob
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > nflug mailing list
> > nflug at nflug.org
> > http://www.nflug.org/mailman/listinfo/nflug
> _______________________________________________
> nflug mailing list
> nflug at nflug.org
> http://www.nflug.org/mailman/listinfo/nflug
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.nflug.org/pipermail/nflug/attachments/20070825/3b9ba9c8/attachment.html


More information about the nflug mailing list