points by rethab 1 day ago | 0 comments
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.
[–] tomjakubowski 1 day ago
[–] somat 1 day ago
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.