writing the content of two files to a single file horizontally
Hi all,
assume that i am having two files file.1 and file.2 these are the contents of file.1 Dinesh Ganesh Anish Dev Jagan Gopi these are the contents of file.2 admin engineer ceo doctor press operation i want these two contents to be written in another single file like this. Dinesh admin Ganesh engineer Anish ceo Dev doctor Jagan press Gopi operation can you please post your suggestions. Thanks in advance, Dinesh |
Open up OpenOffice Calc, or Excel.
Open both files in notepad. Select all on first names, paste into one column. Select all on titles, paste into second column. |
Hi,
i am just want to achieve that through some command |
What commands does it require? Awk? C++? Sed?
|
awk.. would be fine.
|
Code:
awk 'NR == FNR{_[FNR] = $0;next}{print _[FNR],$0}' file1 file2 |
hi grail,
Thanks that works. |
All times are GMT -5. The time now is 11:58 AM. |