thnx peter for the explanation..... one more thing i would like to ask suppose i have 2 files in the first file i have these variables like aa, ab, ac and so on upto bx and in the second file i am having lines like
this is first line
this is second line.
now i want to combine these files and wanna get output like this
aa=this is first line
ab=this is second line
..... and so on upto
bx=this is 50th line.
thnx peter for the explanation..... one more thing i would like to ask suppose i have 2 files in the first file i have these variables like aa, ab, ac and so on upto bx and in the second file i am having lines like
this is first line
this is second line.
now i want to combine these files and wanna get output like this
aa=this is first line
ab=this is second line
..... and so on upto
bx=this is 50th line.
many thanx in advance .....
Comment Responses
Very easy mate, use the
paste
unix command. Like this:Here is my example. I have this in file1:
And I have this in file2:
Now when I run
paste -d= file1 file2
, I get:thnx peter :)
You could emulate the Unix's "paste" command in sed as shown
(assuming both files of equal length and no empty lines)
Reply To This Comment