Read email with command Linux

csplit -z -f msg /var/spool/mail/root ‘/^From /’ ‘{*}’
less $(ls msg* | tail -n 1)

 

tac /var/spool/mail/root | awk ‘/^From /{exit} {print}’ | tac

Leave a Reply