Computing.Net > Forums > Unix > Combining files line by line

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Combining files line by line

Reply to Message Icon

Name: Neil12321
Date: November 23, 2006 at 08:04:05 Pacific
OS: Solaris 10
CPU/Ram: sparc
Product: sun
Comment:

Hi,

I need to combine 2 files line-by-line e.g.:
file1:
a
b
c

file2:
x
y
z

results:
ax
by
cz

I have been trying to loop with sed, but with no luck.

Regards,
Neil




Response Number 1
Name: nails
Date: November 23, 2006 at 09:50:38 Pacific
+1
Reply:


paste -d"\0" file1 file2


Reply to Message Icon

Related Posts

See More


get day of the month Find Port of an Process



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


Google Ads



Results for: Combining files line by line

Reading a file line by line www.computing.net/answers/unix/reading-a-file-line-by-line/5633.html

print a file line-by-line www.computing.net/answers/unix/print-a-file-linebyline/4099.html

read a file line by line in unix www.computing.net/answers/unix/read-a-file-line-by-line-in-unix/7334.html