RE: joining two files
| Newsgroups | gmane.editors.sed.user |
|---|---|
| Message-ID | <000401cf833d$4b39da00$e1ad8e00$@net> |
If using paste, you do need for every keyN to have a corresponding valN in the other file, and they must all be ordered the same, no blank lines, etc. -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Sunday, June 08, 2014 6:31 AM To: Scott Walters; [email protected] Subject: Re: joining two files > I have two files and i need to join them in the following manner. > > keys.txt > ______ > key1 > key2 > key3 > ... > keyn > > values.txt > ______ > val1 > val2 > val3 > .... > valn > > expected output. > ----------------------- > key1=val1 > key2=val2 > key3=val3 > ......... > keyn=valn > > any help is appreciated. > thanks > scott Hi Scott, I'm sure there is a solution featuring sed, but I'd go with paste -d'=' keys.txt values.txt (paste is part of GNU coreutils and available on every Linux system) Regards, Jens [Non-text portions of this message have been removed] ------------------------------------ Posted by: Jens Adam <[email protected]> ------------------------------------ -- Yahoo Groups Links