Find the answer to your Linux question:
Results 1 to 2 of 2
i have a couple of column files, ex like dat1.txt 98 87 dat2.txt 88 and so on (dat3.txt...datn.txt) and i want to combine this column files to single row file ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    yat
    yat is offline
    Just Joined!
    Join Date
    May 2011
    Posts
    8

    combined several column files and convert it into single row file


    i have a couple of column files, ex like

    dat1.txt

    98
    87

    dat2.txt

    88

    and so on (dat3.txt...datn.txt)

    and i want to combine this column files to single row file like this (example like combine dat1.txt and dat2.txt)

    98 87 88

    Appreciate your help guys....

  2. #2
    Just Joined!
    Join Date
    Aug 2005
    Posts
    5
    Code:
    cat dat*.txt | tr '\n' ' '
    will result in a long line with no training new line "\n".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •