mda "grep -Ei -e '^(Subject|Date|From): ' | tr '\n' '~' | sed -e 's/~/, /g' -e 's/, $/\\n/'"
Damit hatte ich noch einige Mails, die so ausgegeben wurden:
grep: (standard input): binary file matches
From: "norisbank" <news@info.norisbank.de>, Date: Mon, 27 Nov 2023 17:27:24 +0100
From: "norisbank" <news@info.norisbank.de>, Subject: Wichtiger Hinweis, Date: Wed, 12 Jun 2024 17:50:44 +0200
From: "norisbank" <news@info.norisbank.de>, Subject: Aufgepasst: Darauf sollten Sie im Urlaub achten!, Date: Fri, 16 Aug 2024 16:25:10 +0200
From: Translator <sonyeurope@bmail.sony-europe.com>, Subject: Sprachbarrieren adé - Der MUAMA Enence macht's möglich!, Date: Thu, 03 Oct 2024 15:11:35 +0000
grep: (standard input): binary file matches
From: "norisbank" <news@info.norisbank.de>, Date: Fri, 11 Oct 2024 11:15:24 +0200
Immer vor Schreiben der Norisbank ohne Subject gab es dieses grep: (standard input): binary file matches. In Thunderbird mit "View Source" die Subjects angesehen, die waren so kodiert:
Subject: =?windows-1252?Q?Dringend:_Bitte_stimmen_Sie_den_=C4nderungen_zu?=
=?windows-1252?Q?_Ihrem_Top-Girokonto_zu?=
Also mal nach grep: (standard input): binary file matches gesucht. Habe es über Webseiten gefunden, und erst dann im Manual.
-a, --text
Process a binary file as if it were text; this is equivalent to the --binary-files=text option.
--binary-files=TYPE
If a file's data or metadata indicate that the file contains binary data, assume that the file is
[...]
By default, TYPE is binary, and grep suppresses output after null input binary data is discovered,
and suppresses output lines that contain improperly encoded data. When some output is suppressed,
grep follows any output with a message to standard error saying that a binary file matches.
Den grep entsprechend erweitert und das -Ei zu -Eia gemacht. Erfolg:
Jetzt kommen die Subjects durch, halt mit verhunzten Umlauten. Als Bild, weil C&P das noch mehr verstümmelt.