Page 1 of 1

Check only the new part of a text file?

PostPosted: Thu Dec 15, 2022 9:14 pm
by halloleo
Hi again. I have another text file that is appended to every night. Is tether an easy way to match against the newly added content?

E.g. The file looks like

Code: Select all
Sync ok.
Compare done.
124534 items transferred.
Connection failed. No Sync.
Compare done.
0 items transferred.
Sync ok.
Compare done.
1245312items transferred.
...

Each time lines get added like:

Code: Select all
Sync ok.
Compare done.
124534 items transferred.

or

Code: Select all
Connection failed. No Sync.
Compare done.
0 items transferred.

When the file changes I would like to check the new portion for "Sync ok".

Can I do this easily with Hazel?

Re: Check only the new part of a text file?

PostPosted: Fri Dec 16, 2022 10:44 am
by Mr_Noodle
I don't think there's any way to do that with the built-in logic. You'd need a script and even then, you'd need some way of recording where in the file it's at.

Re: Check only the new part of a text file?

PostPosted: Fri Dec 16, 2022 4:27 pm
by halloleo
Mr_Noodle wrote:I don't think there's any way to do that with the built-in logic. You'd need a script and even then, you'd need some way of recording where in the file it's at.


Thanks. Makes sense.

I will try to get a single output per run -- this will make it soo much easier!