1 2 3
#!/bin/sh bluetoothctl devices | grep 'WH-1000XM3' | awk '{print $2}' | xargs -I {} bluetoothctl connect "{}"