help in deletion part of a line

Benjamin M. A'Lee bma+lists at
Mon Oct 22 19:38:02 PDT 2007

On Mon, Oct 22, 2007 at 03:41:40PM -0700, Gary Kline wrote:
> 	Is there an easier way by sed or ed to remove strings 
> 	(caight by grep) of the sort:
> 	part5.chapter2.text-
> 	where "5" and "2" can be any integer below 10?
> 	(I know how to delete the *entire* line using ed, but not just
> 	the first part?

gilmour% echo testpart5.chapter2.text-test | sed 's/part[0-9].chapter[0-9]\.text-//g'     

Modify as necessary.

Benjamin A'Lee <bma at>
"The right to search for truth implies also a duty; one must not conceal
any part of what one has recognized to be true." - Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list