Sorry to post such a rudimentary question, but I'm getting confused by all the different tutorials and examples (and slashes and hyphens and back-ticks oh my) so I figured I would get someone's experienced input.
I have a .csv which is obviously comma seperated that has several hundred lines which looks like this:
abcd-3096,62#,,100,,,25,,75,3,
and it should be formatted like so:
{name: 'abcd-3096', weight : 62, some-field1: null, class: 100, some-field2: null, some-field3: null, unit-weight : 25, some-field4 : null, capacity : 75, }
I know you'll either want to use awk
or sed
in order to replace it, and I'm more than fine with doing the formatting in several commands.
I don't expect anyone to format the whole line for me, but I'm hoping some one can show me how to prepend a column with some some text. I can't seem to find a reliable explanation of the command anywhere online.