5 ms·
> Around 100 LOC Say what? To ring the bell after sleeping based on a parameter?
by ams6110 10y ago
> Around 100 LOC
Say what? To ring the bell after sleeping based on a parameter?
- lgas 10y agoTo be fair it does slightly more than that (relative times, absolute times, etc) but it is somewhat ironic considering that it advertises itself as an alternative to one liners like "sleep 4231; beep".
- tingol 10y agoYou can do sleep 15m; beep
- duaneb 10y agoOne of the reasons to use this is to avoid beep, which may not even be enabled on your machine.
- tingol 10y agoUse echo '\a' that's what this program uses anyway... It's literally sleep $1; echo '\a' or you can use at if you want exact time.
- michaelcampbell 10y agoYes, anything can be done in a different way.
- swiley 10y agoX11 bell almost never works for me.
- zokier 10y agoGNU sleep is around 150 loc, and does significantly less...
- glandium 10y agoGNU programs are not a reference. They must have usage(), and handle --help and --version. Even /bin/true. coreutils-8.25$ wc -l src/true.c 80 src/true.c
- liviu- 10y agoDing has `--version`, and a help message too :P To be honest, a big chunk of it is just handling user input and attempting to provide useful error messages.