This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Building Blockchain Apps and have Michael Yuan on-line!
See this thread for details.
Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

vi: adding files

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i concatenate 3 already present vi files to new file using vi in unix?
Considering that I have one already made file open.
 
lowercase baba
Posts: 12800
51
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe the command

:r <filename>

will insert <filenname> into the currently open file, and the cursor position.  So, open the first file, go to the bottom, and insert the second.  Then if you are not at the bottom (i'm not sure where the first insert would leave you), go to it, and insert the third file.
 
Bartender
Posts: 21762
148
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

fred rosenberger wrote:I believe the command

:r <filename>

will insert <filenname> into the currently open file, and the cursor position.  So, open the first file, go to the bottom, and insert the second.  Then if you are not at the bottom (i'm not sure where the first insert would leave you), go to it, and insert the third file.



"r" inserts at the current position. Use ":$" to move to the bottom of the buffer before typing each ":r" command.
 
Did you miss me? Did you miss this tiny ad?
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!