Hi guys,
Currently coding something together to copy and clear down log files on a monthly basis. I thought this would be simple. But I am having problems with the clearing of the original log files. Even when su to root.
Here is a copy of the script I am trying to execute:
while(1)
foreach log (/usr/cs3/master/*.log)
if(-f $log)then
cp -p $log /logs/tetralogs/oct03/;
endif
end
cd /usr/cs3/master
> *.log
When I run the script I get the following error message:
Invalid null command.
I have used the '>' before in a script without issue. Also tried using /dev/null. Anyone have any ideas ?
The files I am attemtping to cleardown are satndard text files.
Currently coding something together to copy and clear down log files on a monthly basis. I thought this would be simple. But I am having problems with the clearing of the original log files. Even when su to root.
Here is a copy of the script I am trying to execute:
while(1)
foreach log (/usr/cs3/master/*.log)
if(-f $log)then
cp -p $log /logs/tetralogs/oct03/;
endif
end
cd /usr/cs3/master
> *.log
When I run the script I get the following error message:
Invalid null command.
I have used the '>' before in a script without issue. Also tried using /dev/null. Anyone have any ideas ?
The files I am attemtping to cleardown are satndard text files.