On Fri, Dec 16, 2011 at 1:11 AM, Bob Proulx <b...@proulx.com> wrote:
> lina wrote:
>> aaa
>> model 0
>> bbb
>> ddd
>> model 1
>> ccc
>>
>> I want to print out the parts which match the "model 0" and ends with
>> match "model 1"
>>
>> for the final expected output is:
>>
>> model 0
>> bbb
>> ddd
>
> Try this:
>
>  sed -n '/^model 1/q;/^model 0/,$p'

Just realize the sed -n '/model 0/,/model 1/'p can also do that. (so
newbie I was/am).

just still don't understand above sentence. sed -n '/^model 1/q;/^model 0/,$p'

Thanks,

>
> Bob


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/cag9cjmk8nau2cjow+3q-0he9sqmm8-jbmxjylodezoyaunq...@mail.gmail.com

Reply via email to