· unix

Unix: Find all text below string in a file


# text I don't care about

= Heading of the bit I care about

# text I care about

$ cat /tmp/foo.txt 
# text I don't care about

= Heading of the bit I care about

# text I care about

$ cat /tmp/foo.txt | sed '1,/Heading of the bit I care about/d'

# text I care about

$ cat /tmp/foo.txt | sed -e '1,/Heading of the bit I care about/d' -e '/^\s*$/d'
# text I care about
  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket