Skip to content

Instantly share code, notes, and snippets.

@jeroenvanwijgerden
Last active November 17, 2023 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeroenvanwijgerden/133c4ed2fa012dbc7dff9505f0c5578f to your computer and use it in GitHub Desktop.
Save jeroenvanwijgerden/133c4ed2fa012dbc7dff9505f0c5578f to your computer and use it in GitHub Desktop.
Says the time, e.g. at 18:09 you will hear "eightteen o' nine"
#!/bin/bash
hours=$(date +"%-H")
minutes=$(date +"%-M")
if [ ${#minutes} -eq 1 ]; then
minutes="o$minutes"
fi
spd-say "$hours $minutes"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment