Doesn't need bash - runs fine (and faster) under sh