Created
January 20, 2019 01:49
-
-
Save sagax/4e2bf0c9b4611a456b0040fa354ef2d5 to your computer and use it in GitHub Desktop.
generator of file as json with array of words
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
# one command line | |
export LINE=200000 LWORD=31 FNAME="dict.json" && printf "[" > "$FNAME" && cat /dev/random | tr -dc 'a-zA-Z' | fold -w $LWORD | head -n $LINE | sed 's/^/"/; s/$/",/' >> "$FNAME" && sed -i '$s/",/"]/' "$FNAME" | |
# | |
export \ | |
LINE=200000 \ | |
LWORD=31 \ | |
FNAME="dict.json" && \ | |
printf "[" > "$FNAME" && \ | |
cat /dev/random | tr -dc 'a-zA-Z' | fold -w $LWORD | head -n $LINE | sed 's/^/"/; s/$/",/' >> "$FNAME" && \ | |
sed -i '$s/",/"]/' "$FNAME" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment