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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding comma to each field data 1

Status
Not open for further replies.

hill007

Technical User
Mar 9, 2004
60
US
I am trying to add comma to data in two columns. I have tried to bring into excel, however, the data size is large.

My data is in this format:

1678.3 2.567 3.1267
4562.1 367.4 7.98
etc

I want the data to be in this format:
1678.3,2.567,3.1267
4562.1,367.4,7.98

Thanks.
 
One way:
awk 'BEGIN{OFS=","}$1=$1' /path/to/input > output

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top