title: Filter a most recent 2 logs in comparison with a given time from a log file in Shell scripting (.ksh)
body: <p>I am analyzing a large log file of a socket server to track some events. I have problem with getting most recent 2 message logs for a given time (one is before and another is after the given time) using a shell script. in this case only thing I can use is date-time value of the log file</p>
  
  <pre><code> e.g. triggering time: 2013-10-31 07:29:45.311
      think I have an event from another log at 2013-10-31 07:29:45.311 and need to filter 
  the most recent message log one is before above time and other one is after from below sample log. 
  
      given time = 2013-10-31 07:29:45.311
      then triggered times for most recent log messages should be 
      1) before the given time: message at 2013-10-31 07:29:34.415
      2) after the given time: message at 2013-10-31 07:30:34.473
  </code></pre>
  
  <p>is this possible to do using a shell script ?</p>
  
  <pre><code>Sample log:
  
      2013-10-31 07:23:33.931 INFO  - TTT153|Receive|0000131|....
      2013-10-31 07:24:35.273 INFO  - TTT153|Receive|0000131|....
      2013-10-31 07:25:33.973 INFO  - TTT153|Receive|0000131|....
      2013-10-31 07:26:34.111 INFO  - TTT153|Receive|0000131|....
      2013-10-31 07:27:34.151 INFO  - TTT153|Receive|0000131|....
      2013-10-31 07:28:34.273 INFO  - TTT153|Receive|0000131|....
      2013-10-31 07:29:34.415 INFO  - TTT153|Receive|0000131|....
      2013-10-31 07:30:34.473 INFO  - TTT153|Receive|0000131|....
      2013-10-31 07:31:34.595 INFO  - TTT153|Receive|0000131|....
      2013-10-31 07:32:34.616 INFO  - TTT153|Receive|0000131|....
      2013-10-31 07:33:35.673 INFO  - TTT153|Receive|0000131|....
  </code></pre>