[ale] Regular expression for sed

Danny Cox danscox at mindspring.com
Mon Jun 17 13:50:49 EDT 2002


Dow,

On Mon, 2002-06-17 at 13:41, Dow Hurst wrote:
> I need to find lines in a file that contain the number 273 with no 
> spaces after it and add 10 spaces after the number.  How should I do this?

	Well,

		sed 's/273[^ ]/273          /g' file >file.new

	should do it.

-- 
kernel, n.: A part of an operating system that preserves the
medieval traditions of sorcery and black art.

Danny


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list