extract all text lines between 2 lines in a file?

Tom Buskey tom at buskey.name
Wed Apr 7 14:37:00 EDT 2004


Oops, sorry about last post....
I have a file:

#!/bin/sh

command1
command2
uniqdelimiter
command3
command4
uniqdelimiter
command5

I want to filter it and get:
command3
command4

In other words, everything between the lines that say "uniqdelimter".

This will do it:
sed '0,/^uniqdelimiter/d' file  | sed '/^uniqdelimter/d'

but I'd like a one liner in sed, grep or awk.  I'll settle for perl too :-)






More information about the gnhlug-discuss mailing list