Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!wb3ffv!wmark From: wmark@wb3ffv.ampr.org (Mark Winsor) Newsgroups: comp.unix.shell Subject: sed question Message-ID: <3880@wb3ffv.ampr.org> Date: 15 May 91 22:33:23 GMT Organization: Advanced Business Solutions - Baltimore , MD Lines: 11 I know that sed -n '/PATTERN1/,/PATTERN2/p' filename will print everything between pattern 1 & 2, but what if I only want the first occurence of these patterns in the file? I know I can pipe the above statement to sed '/PATTERN2/q' but there has got to be a way to do this in one sed process. Thanks. Mark S. Winsor ProVAR, Inc.