#!/bin/bash device="4C:B9:9B:D2:FC:FF" if bluetoothctl info "$device" | grep 'Connected: yes' -q; then echo "Redan uppkopplad" bluetoothctl disconnect "$device" else bluetoothctl connect "$device" fi