Re: joining two files

"Tim Chase [email protected] [sed-users]" <[email protected]>
Newsgroups gmane.editors.sed.user
Message-ID <[email protected]>
On 2014-06-07 22:54, Scott Walters [email protected]
[sed-users] wrote:
> I have two files and i need to join them in the following manner.
> expected output.
> -----------------------
> key1=val1
> key2=val2
> key3=val3
> .........
> keyn=valn

While "paste" is pretty standardly available and the common way to do
it, you *can* do it in GNU sed using the non-standard extension "R":

  sed Rvalues.txt keys.txt | sed 'N;s/\n/=/'

-tkc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.