mirror of
https://github.com/dirtbags/moth.git
synced 2025-01-06 03:50:56 -07:00
17 lines
No EOL
381 B
Bash
Executable file
17 lines
No EOL
381 B
Bash
Executable file
#! /bin/sh
|
|
|
|
# Give it your registration raw data on stdin
|
|
# It appends any new folks to tokens.txt
|
|
|
|
mktoken () {
|
|
dd if=/dev/urandom bs=4 count=1 2>/dev/null | hexdump | while read a b c; do
|
|
[ -n "$b" ] && echo $b$c
|
|
done
|
|
}
|
|
|
|
while IFS=' ' read name email org c1 c2; do
|
|
if ! grep -q "$email" tokens.txt; then
|
|
printf "%s " "$email" >> tokens.txt
|
|
mktoken >> tokens.txt
|
|
fi
|
|
done |