View Single Post
Old 08-16-2005, 11:32 AM   #11 (permalink)
teknomage1
Jack of all trades
 
teknomage1's Avatar
 
Join Date: Feb 2005
Location: Los Angeles
Posts: 596
teknomage1 is on a distinguished road
Send a message via AIM to teknomage1
The reason you can't do that with sed, is because sed only sees one line at a time. But like I said, perl can be a good sed substitute, if invoked as perl -pe 'your old sed directives' it behaves exactly like sed. The addition of m to a search makes it a multiline search, which sed can't usually do. Also if your sed scripts are huge, you can uses s2p to have it automatically converted to a perl script (though it'll be even less legible that hand written perl).
__________________
Stop intellectual property from infringing on me
teknomage1 is offline   Reply With Quote