This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |