easy for some

Matthew Buller - Sun EHQ - MIS matthew at gizmo.UK.Sun.COM
Fri May 3 18:15:27 AEST 1991


I am fairly new to unix, and I have a minor question:-
problem: to extract text between start and end patterns in a file
eg:-

file:

pattern1---

stuff
stuff
stuff

pattern2---

How do I write a short script (preferably /bin/sh) to extract the information
between the start and end patterns (pattern1/pattern2) into a file.

I have tried to grok the man page for `sed' but no luck.

Any help would be appreciated.

Tnx
Matt



More information about the Comp.unix.internals mailing list