Title: Nature
Uncertain what you are really after, but
gving it a shot at
Chagned lines of code
to
if (
/($desc.+)/i ) { print "$1\n"; }
which gave output of:
Job Report for job Filesystem (job ID
1007449200): Files backed up:
421 Total data backed up: 6736785 KB Total data on
tape: 8164352 KB Files backed
up: 0 Files backed
up: 276 Files backed
up: 145 Volsers used:
Wags ;) ps Hope this is what you are after. If
not, some more info and will give it another shot.
#!/usr/bin/perl $filename=$ARGV[0];
# File name to be read must be created
today open(FILENAME,"<$filename"); @search=("Task
Completed", "Job
report", "Volsers
used", "Total Data Backed
Up", "Total Data on
tape", "Files Backed
up");
while(<FILENAME>) { foreach $desc (@search)
{ if ( /$desc/i )
{ print $_;
} } }
"getinfo" [New file] 23 lines, 385 characters $ ls -l total
121 -rw-r----- 1 lbinkley staff
60643 Dec 06 08:47 3C0C7470.log -rw-r--r-- 1 lbinkley
staff 385 Dec 06 08:48 getinfo $
perl getinfo 3C*.log 156.103.1.50 ssjobhnd Tue
Dec 4 01:22:41 2001 SNBJH_3301J Job Report for job Filesystem
(job ID 1007449200): 156.103.1.50 ssjobhnd Tue
Dec 4 01:22:41 2001 SNBJH_3304J Files
backed up: 421 156.103.1.50 ssjobhnd
Tue Dec 4 01:22:41 2001 SNBJH_3311J Total data
backed up: 6736785 KB 156.103.1.50 ssjobhnd Tue Dec 4 01:22:41
2001 SNBJH_3313J Total data on tape:
8164352 KB 156.103.1.50 ssjobhnd Tue Dec 4 01:22:41 2001
SNBJH_3304J Files backed
up: 0 156.103.1.50 ssjobhnd Tue
Dec 4 01:22:41 2001 SNBJH_3304J Files backed
up: 276 156.103.1.50 ssjobhnd Tue
Dec 4 01:22:41 2001 SNBJH_3304J Files backed
up: 145 156.103.1.50 ssjobhnd Tue
Dec 4 01:22:41 2001 SNBJH_3330J Volsers used: $
|
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]