Created
November 18, 2016 13:22
-
-
Save feloy/e8bf73b80f2f5c7965814244316504c6 to your computer and use it in GitHub Desktop.
Random patronym with login
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 | |
if [[ -n "$1" ]]; then | |
N=$1 | |
else | |
N=1 | |
fi | |
FEMININE_FIRSTS=feminine_firsts.txt | |
MASCULINE_FIRSTS=masculine_firsts.txt | |
LASTS=lasts.txt | |
for i in $(seq $N); do | |
N=$(cat $FEMININE_FIRSTS $MASCULINE_FIRSTS | shuf -n 1) | |
P=$(shuf -n 1 $LASTS) | |
echo "$N,$P,$(echo ${N,,} | head -c 1)${P,,}" | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment