SUSE Linux iTOps Tube

Sunday, May 6, 2012

[SOLVED] sed - replacing random numbers followed with space and more random chars

I have big file with pattern going something like this




Code:


Name  CompanyName  ZIP Town  RandomNumbers

The thing is, between ZIP and Town is just a space and i need to replace it with tab. I cant just replace all spaces with tabs because there are spaces also in name and in company name.

I know it should be something like replace


Code:


's/[:digit:][:blank:][:alpha:]/

, but not sure how to replace it with that same digits and characters.











No comments:

Post a Comment