Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2004

    Unanswered: Merging files in a single one USING AWK

    hi all!

    i'm an awk newbie and have been trying in vain to merge two files together.



    a b c
    e f g
    h i j


    1 2 3
    4 5 6
    7 8 9

    i want to end up with:

    a b c 1 2 3
    d e f 4 5 6
    h i j 7 8 9

    so basically i want to append every line in file2.txt to every line in file1.txt

    in a previous thread ( it mentions the use of AWK to do this, i've been looking all over the internet trying to find a way to do this as i have no idea how to go about it!

    can someone help?

  2. #2
    Join Date
    Nov 2004
    i didnt realize that one of the replies to a similar problem to mine was actually a command, eek!

    anyway for those who may browse this, this is the solution!
    as seen in:

    paste file1.txt file2.txt > file3.txt

    (for those who didnt know like me, 'paste' is actually a command!


  3. #3
    Join Date
    Nov 2004
    ps. no this is not an awk solution, but it works great and is simple so ...

Posting Permissions

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