ajtsystems
IS-IT--Management
Hi,
I have a file which I search through and then if I find a string I am looking for the string gets copied to a results.txt file.
What i need to do is initially take a copy of the results.txt file to a results copy.txt file. Next time the script is run the results.txt file is updated with new strings, then results.txt and resultscopy.txt are compared. if they are different then echo to screen "something..."
does anyone know how this might be done? I am strugling with error handling and running the script for the first time. i.e. results.txt exists already and only needs to be copied to resultscopy.txt the first time then next time round results.txt and resultscopy.txt need to be compared...
I have a file which I search through and then if I find a string I am looking for the string gets copied to a results.txt file.
What i need to do is initially take a copy of the results.txt file to a results copy.txt file. Next time the script is run the results.txt file is updated with new strings, then results.txt and resultscopy.txt are compared. if they are different then echo to screen "something..."
does anyone know how this might be done? I am strugling with error handling and running the script for the first time. i.e. results.txt exists already and only needs to be copied to resultscopy.txt the first time then next time round results.txt and resultscopy.txt need to be compared...