Helmut Karlowski wrote:
What about this: function create_xversion() { echo $2 D=`date -r $2 "+%b %e %Y %H:%M"` echo \#define BDATETIME \"$D\" >$1 } FILES=`ls -t *.c *.h` create_xversion xversion.h $FILES
It looks good and simple. However you should exclude the file xversion.h itself from the source files.
I see you have made a function to extract only the first file. Instead, you can use: set $FILES then use $1 as the first file. -- Vincent Rivière