Re: Does bash have a tool ?
On Sunday, March 04, 2018 10:26:51 AM Richard Owlett wrote:
> First I need to eliminate the irrelevant text between "KEY2" of the
> previous message and "KEY1" of the message of interest. It should be
> straight forard to do in BASIC.
> But is there an already tested function for that?
Well, I would tend to use awk, sed, or perl, or even a "decent" text editor
(or word processor) with decent support for regular expressions in the search
and replace function. Multiline regexes will be helpful, at the moment I
don't remember if they are supported in kate / kwrite.
I have done stuff like this in nedit, even saving a series of search and
replace functions as, essentially, a macro / script (I forget what nedit calls
If you expect to do this often, I would think that developing a perl script
would be worth the effort.