To All,
I should have been more specific. I'm trying to
concatenate the second and third columns.
Although I greatly appreciate all the quick answers, I've
already tried all those I've seen, with the exception
of the awk answer.
It's easy to change 2 comma's to one comma. I am trying
to eliminate the second comma on each row and replace it
with a space, thus combining column 2 and column 3, no matter
what is contained in column 3 - numbers, letters, or nothing
__________________________________________________
I have what appeared to me to be a simple problem.
I went out and bought the sed & awk book (O'Reilly) and
went at it. About 7 or 8 hours later, I stopped going at it :-(
I have a simple CVS file that looks like this:
Name,Add,,City,State,Zip,Contact
Joe Inc,123 Main,,Brown,NY,12345,Joe
Pete Inc,456 7th,PO Box 1,Green,NY,12346,Pete
Jack Inc,789 1st,Bldg 5,Red,NY,12347,Jack
If you noticed, the 2nd and 3rd columns are both
address columns. The third column varies and may
be empty, start with a number or small/Capital letter.
All I want to do is eliminate the second , (comma) and replace it
with a space. Unfortunately I'm not strong in regular
expressions and everything I have tried so far isn't working.
There are over 30,000 records in this file. I would
much rather watch sed do it in 15 or so seconds than spend
15 or so days doing it by hand.
Can someone help me with this?
Thanks
John C.
"All my life I wanted to be someone;
I guess I should have been more specific."
________________________________________________________________
YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk! For your FREE software, visit:
http://dl.www.juno.com/get/tagj.