Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| linux:linux-tutorials:send-command-output-via-email [2025/09/08 16:43] – ↷ Page name changed from linux:linux-tutorials:send-crontab-output-via-email to linux:linux-tutorials:send-command-output-via-email Zyzonix | linux:linux-tutorials:send-command-output-via-email [2025/09/08 18:09] (current) – Zyzonix | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Send output of crontab | + | ===== Send output of command |
| - | This guide shows how to configure a crontab | + | This guide shows how to configure a script to send it's output via email. |
| - | Thereby that the '' | + | Thereby that the '' |
| - | The crontab should then look like this: | + | <panel type=" |
| - | <panel type=" | + | |
| <code bash> | <code bash> | ||
| #!/bin/bash | #!/bin/bash | ||
| Line 15: | Line 14: | ||
| crontab () { | crontab () { | ||
| + | echo " | ||
| + | echo " | ||
| echo "From: $SENDER" | echo "From: $SENDER" | ||
| - | echo " | + | echo " |
| echo "To: $RECIPIENT" | echo "To: $RECIPIENT" | ||
| Line 22: | Line 23: | ||
| echo "" | echo "" | ||
| - | echo "Crontab | + | echo "Script |
| } | } | ||