Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8037

Networking and servers • Re: Continuous log bluetooth devices in range

$
0
0
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:

Code:

} | bluetoothctl | \    sed -u 's/\x1b\[[0-9;]*[a-zA-Z]//g' | \    col -b | \    ts '[%Y-%m-%d %H:%M:%S]' >> "$LOG_FILE"
This leverages one of the best features of *nix by piping output through a number of small tools.

Statistics: Posted by rpbillz — Fri Dec 19, 2025 3:10 pm



Viewing all articles
Browse latest Browse all 8037

Trending Articles