[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] Regular expression for sed





Worked like a charm! ??Thanks! ??Been meaning to study regular expressions
and got the O'Reilly book but haven't made time for it. ??Thank you again.
??I needed to not select other 273 values in the file that did have a space
or two after them so this worked great.
Dow


Danny Cox wrote:

  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.