Hacker News new | past | comments | ask | show | jobs | submit login

> Around 100 LOC

Say what? To ring the bell after sleeping based on a parameter?




To 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".


You can do sleep 15m; beep


One of the reasons to use this is to avoid beep, which may not even be enabled on your machine.


Use 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.


Yes, anything can be done in a different way.


X11 bell almost never works for me.


GNU sleep is around 150 loc, and does significantly less...


GNU 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


Ding 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: