|
| On Aug 31, 8:46 am, Janet <jow...@wehco.com> wrote:
> On Aug 31, 8:37 am, Ed Morton <mor...@lsupcaemnt.com> wrote:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Here is the script again. Given that I use csh, what can I do here.
> Had to use csh to get my date stuff to work. I have to use what I
> have available to me at work. This is a work procedure that runs from
> cron once a month. Any advice would be greatly appreciate.
>
> Thanks in advance.
>
> Janet
>
> #!/bin/csh -
> f
> # /usr/bin/
> clean_mereports
> # create monthly directory and move month-end reports to an archive
> folder to sa
> ve
> them
>
> # CREATE MONTHLY
> DIRECTORY
> set mon=`date +
> %m`
> set yr=`date +
> %Y`
> @ mon = $mon -
> 1
> @ yr =
> $yr
> mkdir /spool/mearchives/retl/$mon
> $yr
>
> # MOVE FILE TO /SPOOL/
> MEARCHIVES
> find /spool/nti/retl -type file -a -name "*" -print|xargs -i -t cp {} /
> spool/mea
> rchives/retl/$mon$yr >> & /tmp/
> clean_mereports.log
>
> find /u1/am/arme -type file -a -name "*RETL" -print|xargs -i -t cp {} /
> spool/mea
> rchives/retl/$mon$yr >> & /tmp/
> clean_mereports.log
>
> find /pbs/spool/am/normal -type file -a -name "FISC*R" -print|xargs -i
> -t cp {}
> /spool/mearchives/retl/$mon$yr >> & /tmp/
> clean_mereports.log- Hide quoted text -
>
> - Show quoted text -
Trying to post this again as the copy and paste is causing the
wrapping and preventing a clear picture of the script, this is now
handtyped in here, so hope that you can read it better
#!/bin/csh -f
# /usr/bin/clean_mereports
# create monthly directory and move month-end reports to an archive
folder to save these
# CREATE MONTHLY DIRECTORY
set mon=`date +%m`
set yr=`date +%Y`
@ mon = $mon - 1
@ yr = $yr
mkdir /spool/mearchives/retl/$mon$yr
# MOVE FILE TO /SPOOL/MEARCHIVES
find /spool/nti/retl -type file -a -name "*" -print|xargs -i -t cp {} /
spool/mearchives/retl/$mon$yr >> & /tmp/clean_mereports.log
|
|