Computing.Net > Forums > Unix > join 2 files of different length

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

join 2 files of different length

Reply to Message Icon

Name: Iam
Date: June 30, 2004 at 01:56:36 Pacific
OS: win98se
CPU/Ram: p3
Comment:

I am trying to join two files of different length n different content but content format is same.

this is what i did
join -a1 -a2 file1 file2

but however some lines are missing when output. file1 has 5 lines in it and file 2 has 4 lines in it. format is a string of number, a space, and then some integers.

Why is this so? i read the man page but still dont get it.



Sponsored Link
Ads by Google

Response Number 1
Name: Iam
Date: June 30, 2004 at 09:07:02 Pacific
Reply:

I forgot to add that the lines missing arethe ones that have a longer string of numbers in the first column.

eg..
12345678 2
123455667 5 --> this is the line always missing.


0

Response Number 2
Name: sizzzzlerz
Date: July 4, 2004 at 20:01:39 Pacific
Reply:

Maybe I'm missing something but couldn't you simply cat the two files together, e.g.,

cat file1 file2 > file3


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: join 2 files of different length

Concatenating 2 files www.computing.net/answers/unix/concatenating-2-files/1243.html

list of different lines in files www.computing.net/answers/unix/list-of-different-lines-in-files/5305.html

Join 2 lines into 1 www.computing.net/answers/unix/join-2-lines-into-1/7680.html