Your suggestion will fail the first time because $? will contain the list of all the source files.No problem: $2 contains the first of them.
You mean the date will be wrong? Yes - maybe that's why I used the first version, cannot remember now.
-- Helmut Karlowski