Skip to content
Advertisement

Tag: fileparsing

grep -A until a string

assuming that we have a file containing the following: and we want to grep this file so we take the lines from chapter 1 blah blah to blah num (the line before the next chapter). The only things we know are the stating string chapter 1 blah blah somewhere after that there is another line starting with chapter a dummy

Advertisement