Michael Lazin via plug on 10 Feb 2021 17:52:07 -0800 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] Scripting question |
In case you're interested for the future, the "-B n" option gives you n lines of context before the matched line and "-C n" gives you n lines both before and after the matched line.Sent from my phone. Please excuse my brevity.On Wed, Feb 10, 2021, 5:53 PM Michael Lazin via plug <plug@lists.phillylinux.org> wrote:Thanks! That makes sense. I tested it out and it worked great.___________________________________________________________________________On Wed, Feb 10, 2021, 5:48 PM Carl Johnson <cjohnson19791979@gmail.com> wrote:Add the "-An" argument. Where the "n" is the number of lines that you want to see after the match.On Wed, Feb 10, 2021, 5:45 PM Michael Lazin via plug <plug@lists.phillylinux.org> wrote:I like to think I am good at bash scripting but I am a little bit stumped. I am used to using commands like grep and egrep, but I want to match a pattern in text and then output not just the line that has the pattern but also a few subsequent lines. Can someone please give me a suggestion? Thanks again for your help___________________________________________________________________________Michael Lazin
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug