Last active
November 29, 2019 12:03
-
-
Save Brianetta/0b40760b9090d38993e9a9a88fbcc06f to your computer and use it in GitHub Desktop.
Leave all Keybase teams not listed in the file `kbteams.txt`
This file contains hidden or 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 | |
TEAMS=kbteams.txt | |
for unwanted_team in $( | |
keybase team list-memberships | cut -f 1 -d ' ' | tail -n +2 | grep -v -f <(awk '{print "^" $0 "$"}' $TEAMS) | |
) | |
do | |
echo Leaving team $unwanted_team | |
keybase team leave $unwanted_team | |
done |
This file contains hidden or 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 | |
keybase team list-memberships | cut -f 1 -d ' ' | tail -n +2 > kbteams.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks for this, mate.