Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hot to merge two files with ";" separation for the files entries? 2

Status
Not open for further replies.

ogniemi

Technical User
Nov 7, 2003
1,041
PL
eg.

file1:
aaaaaa
bbbbbb
cccccc

file2:
111111
222222
333333


after merging - result file3:

aaaaaa;111111
bbbbbb;222222
cccccc;333333


Thank you in advance.


 
As we are in the awk forum:
Code:
awk 'NR==FNR{a[NR]=$0;next}{print a[FNR]";"$0}' file1 file2 > file3

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top