Ich such nun schone ne Weile aber finde nichts richtiges.
Ich möchten die Ausgabe von vnstat in ein Python Script einlesen, dort bearbeiten und dann u.U. ein Ergebnis mailen.
Also z.B. so vnstat | auswertung.py wobei auswertung.py ein ausführbares script ist.
input nimmt nur die erste Zeile, eval(input) tut auch nicht, genau so wenig wie list(input)
der output von vnstat sieht so aus
rx: 4.11 MiB tx: 3.27 MiB total: 7.37 MiB
monthly
rx | tx | total | avg. rate
------------------------+-------------+-------------+---------------
2023-09 4.11 MiB | 3.27 MiB | 7.37 MiB | 34 bit/s
------------------------+-------------+-------------+---------------
estimated 4.94 MiB | 2.47 MiB | 7.42 MiB |
daily
rx | tx | total | avg. rate
------------------------+-------------+-------------+---------------
today 4.11 MiB | 3.27 MiB | 7.37 MiB | 904 bit/s
------------------------+-------------+-------------+---------------
estimated 5.19 MiB | 4.13 MiB | 9.32 MiB |
Kann mir bitte jemand einen Tipp geben, Danke
Rainer