Why Nostr? What is Njump?
2024-08-24 21:31:01

scy on Nostr: # Which groups am I a member of? id -nG # Which groups is another user a member of? ...

# Which groups am I a member of?
id -nG

# Which groups is another user a member of?
id -nG bloodninja

# Is that user a member of the `wizards` group?
id -nGz bloodninja | grep -qzxF wizards

The cool thing about that last command is that -z causes `id` to print the list of groups zero-delimited, and `grep` to expect its input zero-delimited. Combined with -x ("must match beginning to end") this is safe against the group name you're looking for being a substring of another one.

#Linux #CLI
Author Public Key
npub1ds9uccvzttwannk5cnf09k8f6wxeuvy84srqhlc98q794n8p5vaq0dpdsr