I have a .csv file that is tab delimited and I need to move the header row information to a "new" column at the beginning and a specified numbers of rows down. I would like to use standard tools that I currently use such as sed
or awk
but if another tool/method is more appropriate I would welcome the suggestion. The header changes per file, that's why I need to copy it instead of just placing the string "CAT" in the appropriate row and column.
CAT
DOG DOG DOG DOG DOG DOG DOG
DOG DOG DOG DOG DOG DOG DOG
DOG DOG DOG DOG DOG DOG DOG
DOG DOG DOG DOG DOG DOG DOG
Would become:
CAT
DOG DOG DOG DOG DOG DOG DOG
DOG DOG DOG DOG DOG DOG DOG
CAT DOG DOG DOG DOG DOG DOG DOG
DOG DOG DOG DOG DOG DOG DOG