1

I have a Script A which calls Script B and Script B writes to a log file. Script A calls Script B several times and each time Script B executes, it writes to a log file with date-time stamp. I would like to GREP "Success" or "Failure" between only two consecutive date ranges:

2013 May 08 12:33:51  Warning  Info blah blah blah    Success
2013 May 08 12:35:15  Warning  Info blah blah blah    Failure
2013 May 08 12:35:15  Warning  Info blah blah blah    Unknown
2013 May 08 12:39:15  Warning  Info blah blah blah    Success 
2013 May 08 12:41:15  Warning  Info blah blah blah    Failure
Zombo
  • 1
  • 62
  • 391
  • 407
AtulyaB
  • 327
  • 1
  • 3
  • 11
  • 1
    can you use `perl` or other scripting language? `grep` may not be the best tool to do what you want. – Bill May 09 '13 at 03:27
  • http://stackoverflow.com/questions/7706095/find-entries-in-log-file-within-timespan-eg-the-last-hour/7714878#7714878 might also prove useful as it offers a non perl solution. – matchew May 09 '13 at 04:22

0 Answers0