5 ms·
while [ true ] do; mail -s"Quick Reminder" `cat userlist` <<EOF `fortune -o` EOF sleep 10 done Job done, leave me to sleep. (Syntax likely
by mikro2nd 6y ago
while [ true ] do;
mail -s"Quick Reminder" `cat userlist` <<EOF
`fortune -o`
EOF
sleep 10
done
Job done, leave me to sleep. (Syntax likely off - I'm sh-rusty!)
- jmnicolas 6y agoOut of curiosity what does the fortune command do? DuckDuckGo failed me here and I don't want the trouble to use "G word".
- dagw 6y agoIt displays a 'funny' random quote or login message.
- thih9 6y agohttps://en.m.wikipedia.org/wiki/Fortune_(Unix) https://en.m.wikipedia.org/wiki/Fortune_(Unix)
- deleted 6y ago[deleted]
- TeMPOraL 6y agoPulls a random, and usually but not always funny, quote from a list it comes with. See: https://en.wikipedia.org/wiki/Fortune_(Unix) https://en.wikipedia.org/wiki/Fortune_(Unix). Most commonly seen as part of login messages, as many Unix and Linux systems come or are configured to pipe a fortune message along with some other fixed text.
- thesuperbigfrog 6y agoNote that you can also create custom fortune messages: https://askubuntu.com/questions/36523/creating-a-fortunes-file https://askubuntu.com/questions/36523/creating-a-fortunes-fi... I have actually used fortune similar to the above script to randomly select inspirational messages as part of a weekly church newsletter.
- deleted 6y ago[deleted]
- ornornor 6y agoThere is also explainshell.com if you want a quick hint without reading the whole man page.
- emeraldd 6y agoAs the others have said. Also, the `-o` in particular includes the list of potentially offensive options.
- prepend 6y agoWhenever I want to know a Unix command (and I’m not at a terminal), I just DDG “man <command>” and it shows me the manual page for this command. That might help you from using the search engine that will not be named.
- comfyinnernet 6y agoYou forgot to use cowsay.
- mikro2nd 6y agoOr banner ;)