Quantcast
Channel: Active questions tagged bash+awk - Ask Ubuntu
Viewing all articles
Browse latest Browse all 102

How to add new columns to CSVs with the same text in all lines

$
0
0

This a sample of my input file:

22/12/1999,conductivity,42,uS/cm06/01/2000,conductivity,22,uS/cm26/01/2000,conductivity,26,uS/cm09/02/2000,conductivity,32,uS/cm23/02/2000,conductivity,33,uS/cm

I would like to reformat it so that it matches another database. The first column needs to say COMPTON in all lines, a sixth needs to say PRECIPITATION, and a seventh NOT APPLICABLE.

I probably need to use some awk function but am unsure.


Viewing all articles
Browse latest Browse all 102

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>