From 0c5766bf44260f4a37cc90e69ca63710178631b3 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 12 Aug 2022 20:40:24 -0300 Subject: bin/{with-,}email: Add "Examples" section to help string --- bin/email | 10 ++++++++++ bin/with-email | 15 +++++++++++++++ 2 files changed, 25 insertions(+) (limited to 'bin') diff --git a/bin/email b/bin/email index dcfdfa4..3c72086 100755 --- a/bin/email +++ b/bin/email @@ -18,6 +18,16 @@ help() { ADDRESS the email addresses to send the email to BODY the text to be sent as the body + + + Send an email to ADDRESS using BODY. + + + Examples: + + Send 10 numbers to mail@example.com: + + $ seq 10 | email -s number mail@email.com EOF } diff --git a/bin/with-email b/bin/with-email index 9d6326b..dc2a022 100755 --- a/bin/with-email +++ b/bin/with-email @@ -17,6 +17,21 @@ help() { -h, --help show this message COMMAND the command to be wrapped + + + Executes COMMAND and send all of its output via email + to eu@euandre.org. + + + Examples: + + Run a script and use the default subject: + + $ with-email -- ./script + + Run a command and use a custom subject: + + $ with-email -s 'CRONJOB' echo 123 EOF } -- cgit v1.2.3