Skip to content

Instantly share code, notes, and snippets.

View jumps-are-op's full-sized avatar

jumps are op jumps-are-op

View GitHub Profile
jumps-are-op / viewmail.sed
Created July 29, 2023 23:39
Viewmail in sed
View viewmail.sed
#!/bin/sed -nf
# Made by Jumps Are Op (
# This software is under GPL version 3 and comes with ABSOLUTELY NO WARRANTY
# viewmail Read standard plain text emails.
# USAGE: viewmail MAILFILE
/^\(From\|Subject\): /p;
/^$/{ :a; $!N; /\n$/{ $!ba;}; s/.*\n//;
/^---*/{ g; :b; $!N; /\n$/!{ g; $!bb;}