#!/bin/bash bluetoothctl devices | cut -f2 -d' ' | while read uuid; do bluetoothctl info $uuid | grep -B9 -e 'Connected: yes' | grep -e 'Device' | cut -f2 -d' '; done