Friday, 7 June 2013

How to monitor a local file for changes, apply a RegEx replace on it and save/overwrite to a destination file?

How to monitor a local file for changes, apply a RegEx replace on it and save/overwrite to a destination file?

I'm running Lubuntu 13.04 (Raring Ringtail).
I'd like to start a script or something that watches a text file for changes. When the file changes I want to run it through a RegEx parser to replace some text and then output the modified file to a destination file.
I'm pretty new to Linux so bear with me but this would be cool to get sorted so thanks for your help in advance...
Cheers, Nick

No comments:

Post a Comment