Grab contents between two patterns

Hi,

What is the best approach to grab contents between

Changes

Dependencies

from the following example snippy

Changes in packages about to be updated:

bash-3.2-32.el5_9.1.x86_64
* Thu Jun 27 22:00:00 2013 Roman Rakus <rrakus@redhat.com> - 3.2-32.1
- Fixed a bug that caused trap handlers to be executed recursively,
  corrupting internal data structures.
  Resolves: #978840


Dependencies Resolved

This does not include start and stop words

awk '/Changes/{f=1;next} /Dependencies/{f=0} f' file

This includes start and stop word

awk '/Changes/,/Dependencies/' file
awk '/Changes/{f=1} /Dependencies/{f=0;print} f' file

I found it. Posting here helps somebody..

cat sample | sed -n '/Changes/,/Dependencies/p'
Changes in packages about to be updated:

bash-3.2-32.el5_9.1.x86_64
* Thu Jun 27 22:00:00 2013 Roman Rakus <rrakus@redhat.com> - 3.2-32.1
- Fixed a bug that caused trap handlers to be executed recursively,
  corrupting internal data structures.
  Resolves: #978840


Dependencies Resolved

---------- Post updated at 01:46 AM ---------- Previous update was at 01:45 AM ----------

Thank you Jotne :slight_smile: