M
Misogi
Grünschnabel
Halli Hallo ^^
Ich beschäftige mich seit kurzem mit dem Linux-System und versuche mich ein bisschen mit Befehlen herumzuspielen.
Mich interessiert nämlich Folgendes:
Also, ich hab ein Log-file, das Ereignisse aufzeichnet. (siehe unten, ein kleiner Ausschnitt)
Mit dem Befehl:
Habe ich die WARNINGS rausgefiltert und in ein Text-file umgeleitet.
Das Problem ist, dass viele gleiche WARNING-Ereignisse vorkommen. Ich hab mit "cut" die Uhrzeit und das Feld WARING[nr.] ausgeblendet. Das wird dann so ausschauen:
Frage: Wie funktioniert das mit while und read. Dass ich Zeile für Zeile vergleiche, und dann sie nur einmal ausgebe ?
LG, Misogi ^_^
Ich beschäftige mich seit kurzem mit dem Linux-System und versuche mich ein bisschen mit Befehlen herumzuspielen.
Mich interessiert nämlich Folgendes:
Also, ich hab ein Log-file, das Ereignisse aufzeichnet. (siehe unten, ein kleiner Ausschnitt)
Code:
Aug 24 11:30:57 [B]DEBUG[6034][/B] chan_iax2.c: Really destroying IAX2/10.88.250.50:4569-10 now...
Aug 24 11:30:57 [B]VERBOSE[6034][/B] logger.c: -- Hungup 'IAX2/10.88.250.50:4569-10'
Aug 24 11:30:57 [B]WARNING[4617][/B] chan_iax2.c: Received mini frame before first full voice frame
Aug 24 11:30:57 [B]WARNING[4617][/B] chan_iax2.c: Received mini frame before first full voice frame
Aug 24 11:30:57 [B]WARNING[4617][/B] chan_iax2.c: Received mini frame before first full voice frame
Aug 24 11:30:58 [B]WARNING[4617][/B] chan_iax2.c: Received mini frame before first full voice frame
Aug 24 11:30:58 [B]DEBUG[4617][/B] chan_iax2.c: Ooh, voice format changed to 1024
Aug 24 11:30:58 [B]DEBUG[4617][/B] chan_iax2.c: Raw Hangup 10.88.250.50:4569, src=11, dst=13
Aug 24 11:31:00 [B]DEBUG[4617][/B] chan_iax2.c: Raw Hangup 10.88.250.50:4569, src=0, dst=13
Aug 24 11:31:00 [B]DEBUG[4617][/B] chan_iax2.c: Raw Hangup 10.88.250.50:4569, src=10, dst=12
Aug 24 11:31:00 [B]DEBUG[4617][/B] chan_iax2.c: Raw Hangup 10.88.250.50:4569, src=10, dst=12
Aug 24 11:31:00 [B]DEBUG[4617][/B] chan_iax2.c: Raw Hangup 10.88.250.50:4569, src=11, dst=13
Aug 24 11:31:00 [B]DEBUG[4617][/B] chan_iax2.c: Received VNAK: resending outstanding frames
Aug 24 11:31:00 [B]DEBUG[4617][/B] chan_iax2.c: Received VNAK: resending outstanding frames
Mit dem Befehl:
Code:
grep -i warning logfile > warnings.txt
Habe ich die WARNINGS rausgefiltert und in ein Text-file umgeleitet.
Das Problem ist, dass viele gleiche WARNING-Ereignisse vorkommen. Ich hab mit "cut" die Uhrzeit und das Feld WARING[nr.] ausgeblendet. Das wird dann so ausschauen:
Code:
Aug 24 chan_iax2.c: Received mini frame before first full voice frame
Aug 24 chan_iax2.c: Received mini frame before first full voice frame
Aug 24 chan_iax2.c: Received mini frame before first full voice frame
Aug 24 chan_iax2.c: Received mini frame before first full voice frame
Frage: Wie funktioniert das mit while und read. Dass ich Zeile für Zeile vergleiche, und dann sie nur einmal ausgebe ?
LG, Misogi ^_^