[TAG] Fwd: Talkback:133/cherian.html
Thomas Adam
thomas.adam22 at gmail.com
Tue Nov 6 15:53:13 MSK 2007
---------- Forwarded message ----------
From: Thomas Adam <thomas.adam22 at gmail.com>
To: TAG <tag at lists.linuxgazette.net>
Date: 6 Nov 2007 12:52
Subject: Re: [TAG] Talkback:133/cherian.html
To: The Answer Gang <tag at lists.linuxgazette.net>
Cc: udassar at jumpgames.co.in
On 06/11/2007, Mudassar Khan <mudassar at jumpgames.co.in> wrote:
> I am new one for shell programming.
And sending email, by the looks of it. Plain text only please. Don't
send HTML email.
> 1) Read text file from source folder and past it in to a destination
> folder
>
> 2) Delete previous text file from destination folder(destination
> folder contain only one text file at a time)
These are the same thing to me: see the mv(1) command.
> 3) And this moving of file happened on weekly basis (after completion
> of a week new text file copied in destination folder in weekly basis )
See cron, especially the @weekly directive for older dixie cron stuff,
although most modern distros have /etc/cron.d/weekly/ and such for
your use. You just drop a shell script in there, with the appropriate
permissions.
> 4) Which file will be copied in the destination folder is decided by
> week . If it is 1st week then p1.txt , if week 5th then p5.txt will be
> copied in destination folder.
>
> 5) Week will be start from any date decided by us (like 14 December on
> Fridays to 22 December Friday is 1st week and other weeks will be
> calculated by 14 December ).
You would use date(1) for this.
Yes I am being vague, but this sounds like homework to me. :)
-- Thomas Adam
More information about the TAG
mailing list