Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sed replace white and leave one character. 1

Status
Not open for further replies.

jouell

MIS
Nov 19, 2002
304
US
Hi.

How would I use sed to replace all white space in a file with a semicolon?


cat file | sed -e 's/ /:/g'


is ok but is leaves a bunch of ":".
I need to have just one.
I am using GNU sed version 4.1.2

Thanks!
-jouell



 
THANK YOU TonyGroves!

I knew I was close, but you nailed it thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top