Comments (3)
  • Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry

1 gammapegasi commented Permalink

This is freaking amazing! Thank you guys :)

2 SunnyG87 commented Permalink

Hi, <div>&nbsp;</div> I have follwing entry in Log file on linux machine with other set of entries. Uisng following grep command to generate the output but its not working as expected. <div>&nbsp;</div> Entry in Log File <br /> ******************** <br /> Tue Feb 10 2015 14:55:06 [xsltmsg][debug] mpgw(MultiTenantFrameworkV001): tid(3929461415)[request][172.16.133.133]: <br /> { "custLoyIds":null, "beginPurchaseDate":"1969-12-31", "endPurchaseDate":"2015-02-10" } <div>&nbsp;</div> Grep Command -&gt; grep "3929461415" FileName <div>&nbsp;</div> Grep Command Output <br /> *************************** <br /> Tue Feb 10 2015 14:55:06 [xsltmsg][debug] mpgw(MultiTenantFrameworkV001): tid(3929461415)[request][172.16.133.133]: <div>&nbsp;</div> Though rest of the content resides on new line but what options should we use in command to print that as well? <div>&nbsp;</div> Thanks.

3 ThinkOpenly commented Permalink

@SunnyG87, you can add context lines like: <br /> grep --after-context=1 3929461415 FileName <div>&nbsp;</div> If in doubt, try "man grep" and see all the options grep offers.