Hi,
I have a file called Data-today.Txt that is updated every 5 minutes.
# cat '/root/Desktop/window/'`date +%b%Y`'/Data-'`date +%d%m%y`'.Txt' > /root/temp.txt
I want to read it every hour and findout the changes and process only those lines added since the last check.
I tried diff but did not get what I want.
At 9:56 A. M. the file looked:
This is line one
This is line two
At 10:00 A. M. I processed these two lines.
At 10:05 A. M. the original file will look like:
This is line one
This is line two
This is line three
at 11:00 A. M. I want to process only the newly added line i.e.
This is line three
Any help will be appreciated.
Regards,
Shantanu Oak