how to delete a log and fin after run job?

Several scripts
Post Reply
User avatar
moha1984
Nouveau
Nouveau
Posts: 53
Joined: 08 Aug 2010 12:00

how to delete a log and fin after run job?

Post by moha1984 » 20 Nov 2010 2:56

The below all the log after running job

Image

And the blowe ios script for control-m server
Image

how can me deleted after 1 day from run it ? or how can change control-m script and how ca get this script?

becouse this is very bad , and my folder is full of logs

can you help me about this issue [/img]

User avatar
philmalmaison
Nouveau
Nouveau
Posts: 1148
Joined: 08 Jun 2007 12:00
Location: Ile de France

Post by philmalmaison » 22 Nov 2010 4:44

Hi,
In a scripts :
use the followig on the control-m server
#!/bin/ksh
ctm_agstat -LIST "*" | grep "Available" | awk '{print $2}' > /tmp/$$$
cat /tmp/$$$ | while read line
do
ctmagcln -agent "$line" -days 1
done
rm -f /tmp/$$$

Regards,
Philmalmaison

User avatar
moha1984
Nouveau
Nouveau
Posts: 53
Joined: 08 Aug 2010 12:00

Post by moha1984 » 23 Nov 2010 9:14

How can use ? can you tel me one by one ? Please :(

Post Reply