Putting in newlines using sed

Steve Harris vsh at pixdoc.UUCP
Wed Nov 20 09:05:05 AEST 1985


Some time ago I tried to do just what you describe.
I eventually gave up, but was working on the idea of:

	save line in hold buffer
loop:	
	yank hold buffer
	delete everything after first "foo ([^)]*)", and print
	yank hold buffer
	delete first "foo ([^)]*)"
	save result in hold buffer
	test somehow whether or not you're done
	if not done, goto loop

I think it can be done, I just never saw it through.

good luck, please post your code if you succeed
(it should be pretty ugly!! :-)

-- 

Steve Harris            |  {allegra|ihnp4|cbosgd|ima|genrad|amd|harvard}\
Pixel Systems Inc.      |               !wjh12!pixel!pixdoc!vsh
300 Wildwood Street     |
Woburn, MA  01801       |  617-933-7735 x2314



More information about the Comp.unix mailing list