Skip to main content
2 of 2
added 516 characters in body
fedorqui
  • 8.2k
  • 9
  • 38
  • 76

paste can also make it:

edited

This prints the first line again. Taking advantage of the lack of quotes, the trailing spaces are not showing:

$ paste -d"\t" <(printf "\n\n\n%s" $(head -1 file)) file
                                    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

original

$ -d"\t" <(printf "\n\n\nCAT") file
                                    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
fedorqui
  • 8.2k
  • 9
  • 38
  • 76