Capturing device logs between specific time

view full story

http://unix.stackexchange.com – We run a test script from a cron regularly , before initiating any actions this test script clears the /var/log/messages and after performing the actions it analyzes the data in /var/log/messages . This is not desired behavior as clearing of device logs is involved at start of test. How can I capture device logs only between when test runs. So that test can analyze only that data? (HowTos)