title: Shell script: Finding out a string in each line of a log and send email
body: <p>I have a log file which has lines like below.</p>
  
  <pre><code>10.10.205.100 100.10.56.5 - [23/Oct/2012:15:30:01 +0000] "GET /way/?cb=777:Obj.Status&amp;log=signing_in_service&amp;cache=1350334642666 HTTP/1.1" 200 53 "https://www.sample.com/signin?off=undefined&amp;questions=&amp;nouser=&amp;link=%23&amp;country=origin&amp;displayLayer=" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2" "PD_STATEFUL_d64f218a-fa6a-11e0-b7df-623c1eeb9903=%2Fgateway; PD-ERR=0x132120c8; PD-HOST=sample.com; PD-REFERER=https://www.sample.com/profile%3Fundefined%3D; PD-REFPAGE=signin_user; pSite=; __SIGNIN=signin%23cw%3D400%3Ach%3D321; mmcore.pd=916254201%7CAgAAAAoBQvp/zPBKCBGRP6QBAOZMgV9Kf89IAAsAAAAtzSlGSn/PSAAAAAD/////AEoIAQAAAAAAAQAAAAAA////////////////AAAAAAABRQ%3D%3D; mmcore.srv=cg4.use; mmid=-1116944464%7CAgAAAAr6f8zwSggAAA%3D%3D; mmcore.tst=0.155; PD-SGNPAGE=http%3A%2F%2Fwww.sample.com%2Fcommon%2Fregister%2Feproxy.html; UnicaNIODID=A3nRYVRjMyy-Xv66UJt; survey=1350334587161"
  </code></pre>
  
  <p>I am trying to get the http status code which is 200 in the above line. This will be placed after the string HTTP/1.1". Version of http (here it is 1.1) may not be common in all the lines.</p>
  
  <p>Based on the status code (if its not 200 and few other status), i have to send an email along with the log file.</p>