Skip to content

Instantly share code, notes, and snippets.

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

jumps are op jumps-are-op

🌙
Idle
View GitHub Profile
@jumps-are-op
jumps-are-op / viewmail.sed
Created July 29, 2023 23:39
Viewmail in sed
View viewmail.sed
#!/bin/sed -nf
#n
# Made by Jumps Are Op (jumpsareop@gmail.com)
# 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;}