Re: [Python-de] Von der Shell zu Python
Stefan Schwarzer wrote:
On 2015-04-11 23:04, Thomas 'PointedEars' Lahn wrote:
On 2015-04-11 22:02, Thomas 'PointedEars' Lahn wrote:
Hermann Riemann wrote:
Ich kann mir dirchaus vorstellen dass die Auswertung von /etc/hosts oder irgendwelchen logfiles mit Python einfacher ist als mit awk Wie kommst Du darauf?
Wie kommst du von
Ich vermute, es kommt auf die Art der Auswertung an.
auf
AWK ist eine Programmiersprache. Du möchtest mindestens ein AWK-Handbuch lesen, bevor Du Vermutungen darüber anstellst.
? Ich kann deinem Gedankengang nicht folgen.
Auch Du ergehst Dich in Vermutungen, ohne *konkret* zu werden, geschweige denn *Belege* für Deine Annahmen zu liefern. Daher erlaubte ich mir, die Vermutung anzustellen, dass auch Du keine Ahnung hast, worüber Du schreibst.
Übrigens kenne ich awk und habe auch schon damit programmiert. :-)
Und wie kommst Du darauf, dass bei einer bestimmten „Art der Auswertung“ „die Auswertung von /etc/hosts oder irgendwelchen logfiles mit Python einfacher ist als mit awk“? Welche „Art der Auswertung“ ist Deiner Meinung nach mit Python einfacher als mit awk, welche schwieriger? Und weshalb? -- PointedEars Twitter: @PointedEars2 Please do not cc me. / Bitte keine Kopien per E-Mail.
On 2015-04-12 10:18, Thomas 'PointedEars' Lahn wrote:
Stefan Schwarzer wrote:
On 2015-04-11 23:04, Thomas 'PointedEars' Lahn wrote:
On 2015-04-11 22:02, Thomas 'PointedEars' Lahn wrote: Wie kommst du von
Ich vermute, es kommt auf die Art der Auswertung an.
auf
AWK ist eine Programmiersprache. Du möchtest mindestens ein AWK-Handbuch lesen, bevor Du Vermutungen darüber anstellst.
? Ich kann deinem Gedankengang nicht folgen.
Auch Du ergehst Dich in Vermutungen, ohne *konkret* zu werden, geschweige denn *Belege* für Deine Annahmen zu liefern.
Ich denke nicht, dass man sämtliche Annahmen immer gleich belegen muss. Bei kontroversen Aussagen mag das geboten sein, aber ich fand meine Aussage, dass es auf die Art der Auswertung ankommt, eher offensichtlich als kontrovers. Bei der Anmerkung dachte ich daran, dass vielleicht manche Diskussionsteilnehmer unbewusst nur einfache Arten von Auswertungen im Sinn hatten. Ich wollte nur darauf hinweisen, dass das nicht so sein muss.
Übrigens kenne ich awk und habe auch schon damit programmiert. :-)
Und wie kommst Du darauf, dass bei einer bestimmten „Art der Auswertung“ „die Auswertung von /etc/hosts oder irgendwelchen logfiles mit Python einfacher ist als mit awk“?
Welche „Art der Auswertung“ ist Deiner Meinung nach mit Python einfacher als mit awk, welche schwieriger?
Ich dachte dabei zum Beispiel an komplexere statistische Auswertungen, die man gern mit NumPy oder Pandas erledigen möchte. Allgemein kann man bei der Auswertung mit Python ja auf alle möglichen Bibliotheken zurückgreifen. Zum Beispiel könnte jemand Daten aus Logdateien mit Daten aus anderen Quellen (beispielsweise aus einer Datenbank oder von einem AMQP-Server) kombinieren. Einfachere Auswertungen wie das Summieren von übertragenen Bytes aus HTTP-Requests aus einem Apache-HTTPD-Logfile dürften wiederum mit Awk einfacher sein, weil die in Awk eingebauten mathematischen Möglichkeiten dafür völlig ausreichen. Viele kleinere Sachen lassen sich prima mit einer Pipe mit einem Awk-Einzeiler erledigen. Viele Grüße Stefan
participants (2)
-
Stefan Schwarzer
-
Thomas 'PointedEars' Lahn