|
| On Aug 31, 9:38 am, Icarus Sparry <use...@icarus.freeuk.com> wrote:
> On Fri, 31 Aug 2007 07:04:44 -0700, janet wrote:
>
>
>
>
> [snip]
>
>
>
>
>
>
>
>
>
> What was the date when you got this error?
> Has there been any change to a program called "date" recently?
>
> I suspect that the problem is because the value of "mon" is "08", and
> this looks as if it ought to be an octal number.
>
> There is almost nothing in this script which is made simpler because it
> is using csh.
>
> #!/bin/sh
> # /usr/bin/clean_mereports
> # create monthly directory and move month-end reports to an archive
> # folder to save these
>
> mon=`date +%m`
> yr=`date +%Y`
> mon=`expr $mon - 1`
>
> # uncomment the following line if you want leading zeros on the
> # month so things sort better.
>
> # if [ "$mon" -lt 10 ] ; then mon="0$mon" ; fi
>
> # It would probably make more sense to have the archives as $yr$mon,
> # again to make things sort better.
>
> dir="/spool/mearchives/ret/$mon$yr"
> mkdir "$dir"
>
> find /spool/nti/retl -type file -name "*" -print |
> xargs -i -t cp "{}" $dir >> /tmp/clean_mereports.log 2>&1- Hide quoted text -
>
> - Show quoted text -
It ran fine last month but wouldn't run this month. I think that your
suspicion is correct.
|
|