The rw-max program

rw-max stamp1 stamp2 [VAR program arg ...]

rw-max computes the larger of the two given timstamps. Then, if no variable name and command are given, it prints the result on stdout. Otherwise, it sets the environment variable to contain the result and runs the given command.