Tru64 5.1A PK5
Does anybody know how to insert a blank line above a specific occurance in a file, without using vi? As in the example file below, I want to insert a balnk line above every occurance of a line starting (or containing) "hello". I tried different itterations of tr, or sed, but most utilities deal with "lines following", not "lines prior".
change:
hello there
tru64 managers
my name is rich
glazier 1234 1234
hello there
tru64 managers
my name is rich
glazier1 12345 12345
hello there
tru64 managers
my name is rich
glazier2 12346 12346
to:
hello there
tru64 managers
my name is rich
glazier 1234 1234
hello there
tru64 managers
my name is rich
glazier1 12345 12345
hello there
tru64 managers
my name is rich
glazier2 12346 12346
__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
Get AOL Instant Messenger 5.1 free of charge. Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
Received on Tue Oct 21 2003 - 21:14:39 NZDT