Linux - SoftwareThis 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.
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.
This replaces the first line, and filters out line2 & line3 individually. The problem with this is that it's treating each line individually. As long as it doesn't matter whether lines 1 - 3 are in a group, or occur individually, then this is okay (which just happens to be the case for me), but I'd rather replace the text as a block if I can (I know there will be other situations where I'll need to do that).
Er...just out of curiosity...is it possible to do the same in vi? I'm trying to get the hang of that as well...I found out how to do the equivalent of s/search/replace/g (hit colon, then enter %s/search/replace/). I'm sure there's something in the vi manual somewhere...