Those are ASCII escape sequences that bluetoothctl uses for terminal output. You can apply a dash of sed and the col utility to filter these out:
This leverages one of the best features of *nix by piping output through a number of small tools.
Code:
} | bluetoothctl | \ sed -u 's/\x1b\[[0-9;]*[a-zA-Z]//g' | \ col -b | \ ts '[%Y-%m-%d %H:%M:%S]' >> "$LOG_FILE"Statistics: Posted by rpbillz — Fri Dec 19, 2025 3:10 pm