The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 07-16-2008
jack00423 jack00423 is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 23
Need to print certain lines from a file

Hi ALL,

I want to print lines from file using certain conditions
for exmple:
# The following commands will create a new control file and use it
# to open the database.
# The contents of online logs will be lost and all backups will
# be invalidated. Use this only if online logs are damaged.

;
ALTER DATABASE OPEN;
SIZE 2000M REUSE AUTOEXTEND OFF;
SIZE 2000M REUSE AUTOEXTEND OFF;
;
ALTER DATABASE OPEN RESETLOGS;
SIZE 2000M REUSE AUTOEXTEND OFF;
SIZE 2000M REUSE AUTOEXTEND OFF;


here i want to print lines between first occurance of ";" and second occurance of it.

Thanks
Jack