[wifi_dmenu.sh]: Make awk use two spaces as column delimiter

This commit is contained in:
2024-12-11 23:35:55 +00:00
parent 89d1672fb0
commit ed7bde8f7b

View File

@ -5,4 +5,4 @@ script_name="$(basename "$0")"
notify-send "$script_name" "Scanning for available networks..."
# cutting the first 9 characters of the nmcli output as it will contain empty fields which will mess up awk parsing
notify-send "$script_name" "$( nmcli connection up $( nmcli device wifi list | cut --characters=9- | awk '(NR > 1){ print $2}' | sort | uniq | dmenu -i -p "Connect to network: ") 2>&1 )"
notify-send "$script_name" "$( nmcli connection up $( nmcli device wifi list | cut --characters=9- | awk -F ' ' '(NR > 1){ print $2}' | sort | uniq | dmenu -i -p "Connect to network: ") 2>&1 )"