Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
07-05-2009, 11:06 PM
|
#1
|
Member
Registered: Mar 2009
Posts: 33
Rep:
|
Comment out next 40 lines with vi-editor?
Is there an easy way to comment out the next 40 lines with the VI editor?
|
|
|
07-06-2009, 12:03 AM
|
#2
|
Member
Registered: Feb 2006
Distribution: Fedora
Posts: 341
Rep:
|
Something like this? (Replace 8 and 18 with your actual start and end line numbers)
|
|
|
07-06-2009, 01:24 AM
|
#3
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360
|
subst start-of-line with '#' (effectively inserts '#' at start of line)
|
|
|
07-06-2009, 01:46 AM
|
#4
|
Moderator
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
|
Commenting the next 40 lines would be:
|
|
|
All times are GMT -5. The time now is 06:09 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|