Version = ARGV.shift
Date = Time.now.strftime("%Y.%m.%d")
ARGV.each do |fname|
  bak = fname + "~"
  system("cp #{fname} #{bak}")
  string = open(bak) { |f|  f.read }
  string.sub!(/20\d\d\.\d\d?\.\d\d?/, Date)
  string.sub!(/Version:?\s+\d+(.\d+)*[a-z]*/, "Version: " + Version)
  open(fname, "w") { |f| f.print string }
end
