vi editor mark to create a sub file from main file: explained

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World

1.      Open the main in vi (vi created.sql)
2.      Go to the line number from where you want to copy. Suppose if you wanted to create a new file using lines from 10 to 20 of main file. Go to 10th line

3.      Put first mark on 10th line (command mode: mf where ‘m’ is for mark and ‘f’ is just mark identifier for first. This can be any character)
4.      Put second mark on 20th line(command mode: ml where ‘m’ is for mark and ‘l’ is just mark identifier for last)
5.      Execute following command in command mode to create new file
:’f,’b w partfile.sql

_____________________________________________________________________________________________________________________

0 comments:

Post a comment

 

acehints.com Copyright 2011-20 All Rights Reserved | Site Map | Contact | Disclaimer