Re: [ OFFLIST ] Re: Need to increment a counter for chapter count

2022-01-06 Thread David G Wagner
Chris S, I tried your script, but nothing appears to happen. No changes. I made mods to your code. I was not as clear as I should have been on explanation desired results. What I am working on is 50 chapters which are of the format: #start# 1 xx 2 xxx …. n xxx #endofGen# What I am

Re: Need to increment a counter for chapter count

2022-01-06 Thread Chris
David, I suspect Chris S. is correct and we’re using different OS versions and so different versions of awk. Looks like I sent you down a rabbit hole. Definitely try his Perl script and let us know if it worked. --Chris(topher)? > On Jan 6, 2022, at 6:07 AM, David G Wagner wrote: > > 

Re: Executing Multiple Saved Regular Expressions

2022-01-06 Thread Peter Kaufman
Thanks, Chris!  I'll try that too!  Love learning new tools!!PeterSent from my Verizon, Samsung Galaxy smartphone Original message From: Christopher Stone Date: 1/6/22 6:12 AM (GMT-06:00) To: BBEdit-Talk Subject: Re: Executing Multiple Saved Regular Expressions On Jan 05,

Re: Need to increment a counter for chapter count

2022-01-06 Thread David G Wagner
Well, not sure what is going on. Here is the three chapters of data after I run the corrected Text Filter. Before I executed your script, I executed Mormdliz line endings to just make sure though I am only working on an Mac or related Apple items. I was going to send you the actual three

[ OFFLIST ] Re: Need to increment a counter for chapter count

2022-01-06 Thread Christopher Stone
Hey Chris, This fails on my Mojave system with the stock `awk`. #Start#Start#Start# 2 In the beginning, God created the heavens and Xxccx #Start#EndOfGen#Start# #Start#Start#Start# 6 Thus the heavens and the earth were finished, Xxxx #Start#EndOfGen#Start# #Start#Start#Start# 10 Now the

Re: Need to increment a counter for chapter count

2022-01-06 Thread Christopher Stone
On Jan 05, 2022, at 14:15, David G Wagner wrote: > I have data in one file and in one window. I could write a Perl script, but > was wanting to handle within BBEdit via filter or ? Hey David, A Perl script can be employed as a text filter, and that's probably as simple as anything.

Re: Executing Multiple Saved Regular Expressions

2022-01-06 Thread Christopher Stone
On Jan 05, 2022, at 17:03, Peter Kaufman wrote: > I have stored over 2 dozen regular expressions stored under the "g" in > Find/Replace. > I'd like to run 6 of them sequentially against a file. Is there a way to do > this? Hey Peter, While Text Factories work well, I tend to use AppleScript