bash xtrace (set -x) inconsistently quotes \r (0x0D) in traced
values. When \r is embedded mid-string,
xtrace wraps in single quotes with raw 0x0D bytes instead of
using $'\r' escaping. This breaks tooling that
processes xtrace output line-by-line
Repeat-By:
#!/usr/bin/env bash
set -x
while IFS= read -r line; do
printf '%s\n' "$line"
xtrace should use $'...' quoting consistently when the value
contains control characters,
as it already does in most cases (e.g. trailing \r from read).
Social: Hey Chet,
Hope you are doing well? Thank you for supporting Bash. I love it!
Best regards,
Marcel