I wanted to conditionally parse some multi-line text out of a data file. Couldn'...
Daniel Howard 🌻 @dannyman@sfba.social
I wanted to conditionally parse some multi-line text out of a data file. Couldn't fathom so I asked Claude, which suggested a multi-line awk script. Cool. Can you do Perl? Cool. A clunky but probably workable finite state automaton. The sort of thing I might have cooked up in the 90s before I became a RegEx weenie.
But my Perl is rusty, so I boiled the problem down to an "egrep '(both|matching lines)' | grep -B 1 'the bit i care about and the line above'" and felt pretty pleased with myself.
I went to write up a Confluence doc to include this and other knowledge, and for a moment I got really angry that the New Document button no longer creates a new document but instead creates a session with an AI chat bot.
After some cussing, I clicked the New Document carat and found the drop-down for advenced users who want to use the New Document button to create new documents. I am a fucking dinosaur, man.
Some nice documentation later and I walked off to ride the Caltrain home.