File Modification Monitor

T

Travis Gassmann

Hello,

I am new to ruby. I have a thrid party application that stores
configuration settings in an ASCII/TEXT file. I need to map each
function within the application to what lines it modifies in the text
file. Every time I save the session, it creates a *.bak_YYMMDDHHmmss of
the previous version of the file.

I am looking to develop a simple script that I would loop through a
directory and then compare the oldest *.bak_YYMMDDHHmmss with the next
newest *.bak_YYMMDDHHmmss, until it reached the newest file. The script
would append the differences to a text file.

A nice to have is a start and stop funcation, where I could have it
watch a directory and when ever a new *.bak_YYMMDDHHmmss file appears it
will compare the files.

I am looking for resoucres on how to program this script.

Thanks
jlimited
 
A

Andrew Stewart

A nice to have is a start and stop funcation, where I could have it
watch a directory and when ever a new *.bak_YYMMDDHHmmss file
appears it
will compare the files.

I am looking for resoucres on how to program this script.

You might Autotest's code instructive. It watches a directory (of
test files) and triggers whenever it spots a change.

http://www.zenspider.com/ZSS/Products/ZenTest/

For file comparison diff-lcs should be more than enough:

http://raa.ruby-lang.org/project/diff-lcs/

Regards,
Andy Stewart
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top