write
your buddies a random message. nudge
works by checking who's online
(via who
), filtering it to users you specify, and sending each one of them a
randomly selected message (via write
) from an array of messages you specify.
NOTE: this script is developed in an envrionment with RHEL 7.2 and bash 4.2.46. It should work in other environments, but your mileage may vary.
To execute, simply do /path/to/nudge
.
You'll want to configure the $users
variable to specify the usernames that
you're looking to message. Since it's being piped directly to grep
you'll
want to delimit them with pipes (|
) for a proper regex.
The messages being sent can be configured in the $phrases
variable.
If you'd like to be extra persistent and annoying you can setup the script to run periodically as a cronjob.
Could this be improved? Fork the repo, commit your changes, and send a pull request my way.
Shoutout to @pjbirr and @galordmtu for helping with testing and such.
Licensed under MIT License.