Skip to content

Commit

Permalink
shellcheck: double quote
Browse files Browse the repository at this point in the history
  • Loading branch information
Dummy committed Dec 24, 2022
1 parent f3bdeb2 commit 3938f43
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions neofetch
Original file line number Diff line number Diff line change
Expand Up @@ -3289,12 +3289,12 @@ get_network() {
"Mac OS X"|"macOS")
ActiveNetwork=$(route get default | grep interface | awk '{print $2}')
ActiveNetworkName=$(networksetup -listallhardwareports | grep -B 1 "$ActiveNetwork" | awk '/Hardware Port/{print}'| awk '{print $3}')
if [[ $ActiveNetworkName == "Wi-Fi" ]]; then
if [[ "$ActiveNetworkName" == "Wi-Fi" ]]; then
LinkSpeed="$(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk '/maxRate/{print}' | awk '{print $2}' )Mbps"
else
LinkSpeed="$(ifconfig $ActiveNetwork | awk '/media/{print}' | sed -E "s/.*\((.*)\).*/\1/")"
LinkSpeed="$(ifconfig "$ActiveNetwork" | awk '/media/{print}' | sed -E "s/.*\((.*)\).*/\1/")"
fi
network="$ActiveNetwork: $ActiveNetworkName@$LinkSpeed"
network=""$ActiveNetwork": "$ActiveNetworkName"@"$LinkSpeed""
;;
esac
while IFS=' ' read -r n i; do
Expand Down

0 comments on commit 3938f43

Please sign in to comment.