|
Yes, that does work brilliantly, thank you. I would never have guessed a gap between the i and the backslash. The manual says: "[1addr]i\ text" - i.e. no gap. Definitely the most useless manual IBM ever put out (grumble, grumble)
1. If I prefered to give the pattern inline how would that change the string? How do I deal with a picky newline in that case?
2. If I want to change the file rather than display it, how do I arrange the from- and to-file in the string.
3. If I don't want the pattern to be the whole line can I just take the ^ and $ off?
Although I'd like to know how to do it without a script file, I probably will use a script file this time since I have several things to insert in one go - i.e. "Something at the top, something before the line that contains such-and-such, something three lines after that ... and so on", so if there are any snags about multiple actions in a script I'd be glad to know them.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.