Last active
November 15, 2015 05:05
-
-
Save martinvol/c9bbdd1933ff8a72eb97 to your computer and use it in GitHub Desktop.
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 | |
current_network="$(iwgetid -r)" | |
if [[ -z $current_network ]]; then | |
echo "Not connected to network :(" | |
exit | |
fi | |
echo Your network is $current_network | |
echo "$(sudo cat /etc/NetworkManager/system-connections/$current_network | grep ^psk= | sed "s/psk=/Password is: /")" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment