Wonderful AWK command there. For those with hobbies other than AWK, here's what it does:
- set variable s to that string: -v s='=== /C=IN/OU=emSign PKI/O=eMudhra Technologies Limited/CN=emSign ECC Root CA - G3'
- on lines matching the regex between //, set skip to false: /^(===|###) /{skip=0}
- on lines matching s, set skip to true: $0==s{skip=1}
- if skip is false, print the line: !skip
Note the last part where it just says !skip without a curly braces. AWK defaults to print in that case.
AWK is a great little language. But you know how some people get hung up on the useless use of cat, I get triggered whenever I see a grep piped into an awk.
And on the subject of the useless use of cat, I like the form because it makes input a normal command(replaceable by any other command), rather than a shell special form. I sort of wish that "tee" would not default to emitting on stdout to better act as cat's compliment.
It’s not just correcting grammar. Not just a few words. Almost every paragraph starts in the same style.
To be clear, I don’t want to be negative. Don’t want to just troll —- I’m just noticing how all of it is generated. It’s difficult to unsee once you know.
reply