unix - Cat Content after a specific line in log file -



unix - Cat Content after a specific line in log file -

i cat contents of file follows , includes target line.

2014-06-23 11:01:01,001 dog 2014-06-23 12:01:01,001 cat 2014-06-23 13:01:01,001 elephant 2014-06-23 14:01:01,001 bird 2014-06-23 15:01:01,001 rabbit 2014-06-23 16:01:01,001 deer

i want cat line 2014-06-23 13:01:01,001 elephant , next lines searching 2014-06-23 13:01:01,001

the desired output be:

2014-06-23 13:01:01,001 elephant 2014-06-23 14:01:01,001 bird 2014-06-23 15:01:01,001 rabbit 2014-06-23 16:01:01,001 deer

thank in advance , welcome documentation links!

using sed, can print pattern 2014-06-23 13:01:01,001 end of file, this:

$ sed -n '/2014-06-23 13:01:01,001/,$p' file 2014-06-23 13:01:01,001 elephant 2014-06-23 14:01:01,001 bird 2014-06-23 15:01:01,001 rabbit 2014-06-23 16:01:01,001 deer

unix cat

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -

ruby on rails - Devise Logout Error in RoR -