Hello, my name is Leandro and i can create your script. I already have a couple similar scripts in place. Since you are using Linux, any particular reason for wanting PHP? This can be best made through a shell script.
Performance wise it will only take a few moments, no need for tests, especially considering the budget. I know this because my other script parses 10 million lines multiple times for very complex regexes and the whole thing takes less than 2 mins.
I can get started right away!
Leandro