Question 2 of the Google Treasure Hunt is out and is fairly easy compared to the last question. They request you to sum up numbers of a specific line in files where the path or file name contain a specific pattern and have a specific file ending. I quickly wrote an PHP script to do the job.
Here is the source:
All you need to do is unpack the zip archive with the files in a folder named google, rename the downloaded file to google.php, change the last line accordingly to your problem and run the PHP script either via command line (you’ll need to have PHP installed for this) or via webbrowser, if you have some PHP-enabled webspace.