Skip to content

Instantly share code, notes, and snippets.

View pastewka's full-sized avatar

Lars Pastewka pastewka

View GitHub Profile
@pastewka
pastewka / bluetooth.sh
Last active September 20, 2021 15:56
Automatically import bluetooth keys from Windows to Linux
#! /bin/bash
WINDOWS_ROOT=$1
cd $WINDOWS_ROOT/Windows/System32/config
# Get MAC address of Bluetooth module
for mac in /var/lib/bluetooth/??:??:??:??:??:??; do
btmacwin=$(basename ${mac} | sed 's/://g' | awk '{print tolower($0)}')
btdir=${mac}