Quantcast
Channel: Transpose few columns from a csv file based on several columns using awk - Unix & Linux Stack Exchange
Browsing all 2 articles
Browse latest 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 all 2 articles
Browse latest View live




Latest Images