Created
December 7, 2022 19:55
-
-
Save stchris/a78933de8cb83f4325d87297086f55ff to your computer and use it in GitHub Desktop.
Generate a large amount of LibreOffice ODT files with random content
This file contains 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
#!/usr/bin/env bash | |
# number of .odt files to generate | |
HOW_MANY=100 | |
# number of random words to insert | |
WORD_COUNT=5000 | |
# file prefix | |
PREFIX="rand-" | |
for (( i=1; i<=$HOW_MANY; i++ )) do | |
shuf -n $WORD_COUNT /usr/share/dict/words > rand.txt | |
timestamp=$(gdate +%s.%N) | |
pandoc -o $PREFIX$timestamp.odt rand.txt | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment