Hi ALL,

I want to print some lines from file like
example
=====
RECOVER DATABASE
ALTER DATABASE OPEN;
ALTER TABLESPACE TEMP ADD
ALTER TABLESPACE TEMP ADD STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE
-- SET STANDBY TO MAXIMIZE PERFORMANCE
MAXLOGFILES 16
MAXLOGMEMBERS 5
MAXDATAFILES 512
MAXINSTANCES 1
MAXLOGHISTORY 7260
LOGFILE


I want to print the lines from "ALTER TABLESPACE TEMP ADD " to till "MAXINSTANCES 1"

Pleas help me in this
Thanks
Jack

Recommended Answers

All 3 Replies

It worked for me..Thanks a lot reply...

cat -n filename|tail +3 |head -8

cat  -n filename|head -10|tail -8

cat -n filename|sed '3,10p'

cat -n filename|grep -B +7 "10"
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.