#!/bin/bash device="40:8E:2C:03:25:E5" if bluetoothctl info "$device" | grep 'Connected: yes' -q; then echo "Redan uppkopplad" bluetoothctl disconnect "$device" else bluetoothctl connect "$device" fi