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

    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.

    ie.

    file1.txt:

    a b c
    e f g
    h i j

    file2.txt:

    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 (http://www.dbforums.com/t999021.html) 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?
    thanku!

  2. #2
    Join Date
    Nov 2004
    Posts
    3
    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: http://www.dbforums.com/t999021.html

    paste file1.txt file2.txt > file3.txt

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


    ciao!
    nicole/nauke

  3. #3
    Join Date
    Nov 2004
    Posts
    3
    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
  •