[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Does bash have a tool ?

On 03/04/2018 10:02 AM, rhkramer@gmail.com wrote:
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.

I don't have any background in Perl and the last formal course in programming was in the 60's.

However awk and/or sed may be what I'm looking for and are well documented. Your description of nedit is interesting. I'll investigate. I'm on my way out at the moment.

Thank you.

Reply to: