![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
help in vi
Hi,
I have a file called a.txt with around 200 lines which is a big file. I have another file called b.txt with around 50 lines. I want to merge both the files. How do we do it using vi? Thanks. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
From within a.txt, move the cursor to the end of the file, enter "!!cat b.txt" (without the qoutes) and it should append the file b.txt to your file. You can then save as a.txt or another name.
|
|
#3
|
|||
|
|||
|
Thank you , that works.
|
|
#4
|
|||
|
|||
|
I usually just use ":r b.txt" while editing a.txt.
|
|||
| Google The UNIX and Linux Forums |