|
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
|