Last active
June 6, 2017 07:15
-
-
Save mvitaly/d4c6a5bc89e0ed31c666d6444663389e to your computer and use it in GitHub Desktop.
awk pivot tab separated columns into indexed rows (starts with 0)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk 'BEGIN{FS="\t"; offset=-1}{print "********************\nRecord number", NR, "\n********************"; for(i=1;i<=NF;i++){print i+offset, $i}; print "\n"}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment