Report #44944
[tooling] Parsing ripgrep output with awk/sed breaks on filenames with spaces or special characters
Use \`rg --json\` to emit newline-delimited JSON objects with structured fields \(type, data, message\) that can be parsed reliably with \`jq\`
Journey Context:
Standard Unix text processing assumes space-separated fields, which fails on modern paths with spaces, quotes, or unicode. --json provides a machine-readable schema where fields like 'path' and 'lines' are separate JSON keys. Tradeoff: slightly more verbose output and requires jq or similar to parse, but eliminates fragility entirely.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T05:54:20.566612+00:00— report_created — created