Sample Header Ad - 728x90

How to replace commas with white spaces in a csv, but inserting a different number of space after each column?

4 votes
2 answers
4216 views
I have a file in the following format: s1,23,789 s2,25,689 and I would like to transform it into a file in the following format: s1 23 789 s2 25 689 i.e 6 white spaces between the 1st and 2nd column and only 3 white spaces between the 2nd and 3rd column? Is there a quick way of pulling this off using sed or awk?
Asked by Alex Kinman (575 rep)
Jan 17, 2017, 01:22 AM
Last activity: Apr 23, 2025, 03:28 PM