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
File conditions | |
-b filename - Block special file | |
-c filename - Special character file | |
-d directoryname - Check for directory Existence | |
-e filename - Check for file existence, regardless of type (node, directory, socket, etc.) | |
-f filename - Check for regular file existence not a directory | |
-G filename - Check if file exists and is owned by effective group ID | |
-G filename set-group-id - True if file exists and is set-group-id | |
-k filename - Sticky bit | |
-L filename - Symbolic link |
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
#!/usr/bin/env bash | |
function get_headphones_index() { | |
echo $(pacmd list-cards | grep bluez_card -B1 | grep index | awk '{print $2}') | |
} | |
function get_headphones_mac_address() { | |
local temp=$(pacmd list-cards | grep bluez_card -C20 | grep 'device.string' | cut -d' ' -f 3) | |
temp="${temp%\"}" | |
temp="${temp#\"}" |
OlderNewer