You're viewing a comment by nanker and its responses.
You're viewing a comment by nanker and its responses.
I am being sponsored by Syntress! They bought me an amazing dedicated server to run catonmat on. If you're looking web services, I highly recommend the Syntress guys!
I am being sponsored by A-Writer! If you ever need help with essay writing, look no further than A-Writer! They will help you with your writing in as quickly as 3 hours!
I love to read science books. They make my day and I get ideas for awesome blog posts, such as Busy Beaver, On Functors, Recursive Regular Expressions and many others.
Take a look at my
Amazon wish list, if you're curious about what I have planned reading next, and want to surprise me. :)
If you are interested in advertising on catonmat.net, contact me.
Free tools for coding on Vietstarsoft.com.
Programming homework help.


hey I loved your SED oneliners and I can make much better use of SED having read them. I am running into a few things I would like to do with file manipulation I can find a solution for with sed and have been thinking Perl might be what I need.
In specific, I want to search a file for a particular string and the line number on which it occurs... say line 5...
5 <font>
read in the line number, add 1 (or any number I like) and enter that number as the value for the (HTML) font tags...
5 <font>6
I guess I should first ask if there is indeed a way in SED this can be easily accomplished? if not how could I do this in perl?
I am not a programmer, I get done what I need to and very little more, so the more plain the answer the better for.
currently when I run into these kinds of things I just end up fixing them manually, but I know there are better ways. I am thinking I should just dive in and spend the time to learn enough perl work from the command line in place of SED. Is that a reasonable progression do you think, if I am editting files almost daily with little tasks like this?
thanks for the help and any advice
Reply To This Comment