Thank, Chris but did not do as desired. Here is the output received(cutdown from my extended data test):
#Start##Start#start#Start# 3 In the beginning, God created the heavens and the #Start#EndOfGen#Start# #Start#Start#Start# 7 Thus the heavens and the earth were finished, and #Start#EndOfGen#Start# #Start#Start#Start# 11 Now the serpent was more crafty than any other #Start#EndOfGen#Start# Desired out: #Start# 1 In the beginning, God created the heavens and the #EndOfGen# #Start# 2 Thus the heavens and the earth were finished, and #EndOfGen# #Start# 3 Now the serpent was more crafty than any other #EndOfGen# What each start and end is a chapter. In the data. You Have the start and then 1. What I want to do is replace the 1 with the current chapter number. First hit is Chapter 1. The fifth would be Chapter 5, etc. Thoughts??? Wags ;) WagsWorld Hebrews 4:15 Ph(primary) : 408-914-1341 Ph(secondary): 408-761-7391 On Jan 5, 2022, 18:01 -0800, [email protected], wrote: > > #!/usr/bin/env awk -f > > BEGIN { > RS = "#Start#" > ORS = "" > FS = "\n" > OFS = "\n" > } > > { > sub( /[0-9]+/, NR , $2 ) > print "#Start#" $0 > } -- This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "[email protected]" rather than posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit> --- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/9934c9ba-53d0-4701-8e4f-c29fb2d94941%40Spark.
