Sleep until specified time
In a program comment it is said that the program

# Accepts any date/time format accepted by 'date'


That information should be printed with the usage help, plus one or two examples. Something like


$ ./sleep_until.sh --help
Usage: ./sleep_until.sh TIME

    TIME can be any date/time as accepted by date(1).

Examples:

    ...    


That'll save me from looking into the source code (and possibly from
looking up man date) in order to figure out the correct parameters.



Due to the truncation in 

test ${end%.*} -gt ${now%.*} || die "$1 is in the past!"


there is a (albeit small) chance that a valid date is not recognized.
This can be avoided by computing the delay first, and then checking
it to be positive (e.g. as in How to compare to floating point number in a shell script):

end=$(date -d "$1" +%s.%N)
now=$(date +%s.%N)
delay=$(echo $end - $now | bc)
test 1 -eq $(echo "$delay &gt; 0" | bc) || die "$1 is in the past!"
exec sleep $delay


Note: I'm using bc rather than dc here just because I needed it for the check $delay &gt; 0 and found a bc-based solution first (and then I did not want to use two different tools). Also I am a little bit more familiar with bc. Some criteria are given in the Unix &amp; Linux question How is bc different from dc?, such as “bc is standardised by POSIX and so is probably the more portable of the two.”