Need a Script

From: Ken (SHIELDSIT)12 Sep 2015 19:44
To: ANT_THOMAS 3 of 6
I think the only records I'd want from the log file are designated like this: [query]  so it shouldn't be terribly hard to do that right?  How would I flush that file afterward though? I think there is probably a built in command that does like like it rotates the log files.
From: Ken (SHIELDSIT)12 Sep 2015 19:49
To: ANT_THOMAS 4 of 6
Got that grep portion working, thanks for reminding me about it!  It's something I should use daily but just haven't taken the time to really learn yet.
From: ANT_THOMAS12 Sep 2015 19:53
To: Ken (SHIELDSIT) 5 of 6
You could delete and recreate the file at the end of the script.

Or copy the contents, empty the file, then do the mysql stuff after to make sure no extra stuff is added whilst it's all going on.
From: Ken (SHIELDSIT)12 Sep 2015 19:55
To: ANT_THOMAS 6 of 6
I'll give it a shot and let you know how I've fucked things up!