1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
BR0063I 77 of 77 files processed - 430130.359 of 430130.359 MB done
BR0115I Compression rate for all files 4.26:1
BR0052I BRBACKUP completed successfully
BR0280I BRBACKUP time stamp: 2018-08-21 23:26:43
BR0292I Execution of BRARCHIVE finished with return code 0
Backupgroesse=$(ls -l /C/logfile.txt | awk '{ print $5 }')
echo $Backupgroesse;
BR0063I 77 of 77 files processed - 430130.359 of 430130.359 MB --> 430130
backupdatum=$(cat /C/logfile.txt | grep BR0280I | tail -1 |awk '{ print $5 }')
echo $backupdatum;
BR0280I BRBACKUP time stamp: 2018-08-21 23:26:43 --->2018-08-21
backupmeldung=$(cat /C/logfile.txt | grep BR0292I | awk '{ print $5,$6,$7,$8,$9 }')
echo $backupmeldung;
BR0292I Execution of BRARCHIVE finished with return code 0 --> finished with return code 0
ergb=$(cat /C/logfile.txt | grep BR0292I | awk '{ print $9,$10 }')
dateig=$(ls -al /C/logfile.txt | awk '{ print $5 }')
BR0292I Execution of BRARCHIVE finished with return code 0 -->0
Beispielhafter Logauszug
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#!/usr/bin/perl use strict; use warnings; my $Logpfad = '/c/'; my $Logdatei = " $Lpfad/logfile.txt "; my ($hash,$backupgroesse,$backupdatum,$faktor,$size,$zaehler,$Zeitdieffernz); print $Logdatei; open ($Logdatei) || die ("Error : can't open log file"); #my $Logdatei = '/c/logfile.txt' ; print "$Logdatei"; "perl -lane ' print $ F [0] ' $Ldatei"; #print Ldatei; perl -alne ' print $F (1) $Logdatei' (tut nichts) $backupgroesse=$( ls -l $Logdatei | awk' '{ print $5 }');(geht nicht in Perl) print "$bacupgroesse"
Guest perlineuHallo, ich habe leider keine keine code in Perl.
Guest perlineukann bitte jemand mr helfen, die ganze grep/awk/ abfragen i Perl zu schreiben?