test.txt
Welcome notice
------------------------
Hello there, welcome! Foo
hello
world
Bar
Yes!
Foo
How are ya?!
Bar
Have a great day!
sed-grab text
$ sed -n '/Foo/,/Bar/p' test.txt
Output
Hello there, welcome! Foo
hello
world
Bar
Foo
How are ya?!
Bar
How to make this register insensitive? For example, say "FOO" or "bAr" will match the matching pattern for sed? I tried "I", no luck. That should be quick, thanks guys!
source
share