Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing out

Status
Not open for further replies.

sethu

Programmer
Apr 15, 2000
29
US
Given a file with several lines and then a line of "----------------------------", how would I print everything until the end of the file? In other words I need to use a UNIX script to print everything below the "----------------------------":
Working file: build/postinstall
head: 1.22
branch:
locks: strict
access list:
symbolic names:
V0_1_18: 1.3
V0_1_17: 1.2
V0_1_16: 1.1
V0_1_15: 1.1
V0_1_14: 1.1
V0_1_13: 1.1
V0_1_12: 1.1
V0_1_11: 1.1
keyword substitution: kv
total revisions: 22; selected revisions: 1
description:
----------------------------
revision 1.22
date: 2001/01/09 16:31:58; author: mhsieh; state: Exp; lines: +4 -4
Added check for profiling and soft_launch_check parameters
 
sethu-

This should do it for you.


awk '

{
if (( $0 !~ /-+/ ) && ( !flag )) {
next
} else {
print
flag = 1
getline
}

print

}' $1 | more

Hope this helps.


flogrr
flogr@yahoo.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top