Tighten bluetoothctl output matching to exclude logs
authorSiraaj Khandkar <siraaj@khandkar.net>
Mon, 2 Nov 2020 09:59:30 +0000 (04:59 -0500)
committerSiraaj Khandkar <siraaj@khandkar.net>
Mon, 2 Nov 2020 09:59:30 +0000 (04:59 -0500)
home/lib/login_functions.sh

index 6b0c1bc..243f15f 100644 (file)
@@ -346,7 +346,7 @@ _bt_devs_infos() {
     # which bluetoothctl outputs
     awk '/^Device +/ {print $2}' \
     | xargs -I% sh -c 'echo info % | bluetoothctl' \
-    | awk '/^Device |^\t/'
+    | awk '/^Device |^\t[A-Z][A-Za-z0-9]+: /'
 }
 
 bt_devs_paired() {
This page took 0.026226 seconds and 4 git commands to generate.