How to get the final group of text between two patterns with sed or awk

There are several answers on this site about how to capture text between two patterns and print out each group, but I am interested only in the last group. My output comes from echo “” | openssl s_client -showcerts -connect oidc.eks.us-east-1.amazonaws.com:443 2>&1 |\ sed -ne ‘/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p;/-END CERTIFICATE-/a\’ and I want to grab the…

Details

Experimental push on scalar is now forbidden at /usr/local/bin/indent2tree

I realize similar questions have been asked. However, in this case I wish to use this open source perl script: https://github.com/bAndie91/tools/blob/master/usr/bin/indent2tree This line is producing the error Experimental push on scalar is now forbidden at /usr/local/bin/indent2tree line 43, near “};” push $ForkPoint->{subtree}, {data=>$data, parent=>$ForkPoint, subtree=>[]}; I am not very familiar with Perl. I did check…

Details

How to use a CSS selector that gets all matching elements except those inside a specific child?

Assume an HTML structure as shown: <div id=”container”> <div class=”A”> <div id=”excludedElement”> <p> <span class=”MyClass”>1</span> <span class=”MyClass”>2</span> <span class=”MyClass”>3</span> </p> </div> </div> <div class=”B”> <p> <span class=”MyClass”>4</span> <span class=”MyClass”>5</span> <span class=”MyClass”>6</span> </p> </div> </div> I want all elements inside of the “container” div that have the class “MyClass” except for those inside of the “excludedElement”…

Details