Skip to content

Instantly share code, notes, and snippets.

View matthew-nm's full-sized avatar

Matthew matthew-nm

  • California, USA
View GitHub Profile
@matthew-nm
matthew-nm / rfkill-toggle.sh
Last active October 19, 2017 06:52 — forked from cameronism/rfkill-toggle.sh
rfkill-toggle.sh
#!/bin/bash
# Usage ./rfkill-toggle.sh [IDENTIFIER]
# where IDENTIFIER is the index no. of an rfkill switch or one of:
# wifi wlan bluetooth uwb ultrawideband wimax wwan gps fm nfc
ID=`rfkill list "$1" | head -n 1 | cut -d : -f 1`
SOFT="/sys/class/rfkill/rfkill$ID/soft"
if [ ! -f "$SOFT" ]; then