Quantcast
Channel: Transpose few columns from a csv file based on several columns using awk - Unix & Linux Stack Exchange
Browsing latest articles
Browse All 2 View Live

Answer by Ed Morton for Transpose few columns from a csv file based on...

$ cat tst.awkBEGIN { FS=OFS="," }NR==1 { for (numHdrs=1; numHdrs<=NF; numHdrs++) { if ( $numHdrs != "" ) { break } } numHdrs-- next}{ hdr = "" for (i=1; i<=numHdrs; i++) { hdr = hdr $i OFS }}NR...

View Article


Transpose few columns from a csv file based on several columns using awk

In my previous tag, i would keeping csv columns using a awk generic code. The answer was given here by @steeldriver.In the following, I want to transpose some columns from a csv file to get a new...

View Article

Browsing latest articles
Browse All 2 View Live


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