-
-
Save shalinmangar/de8a9af5577ff000e556 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
booklink=http://www.gutenberg.org/ebooks/1322.txt.utf-8 | |
bookfile=leaves.json | |
if [ ! -f $bookfile ] ; then | |
wget $booklink -O $bookfile | |
fi | |
booksize=`ls -lh $bookfile | awk '{ print $5 }'` | |
echo "$bookfile is $booksize" | |
contents=`cat leaves.json` | |
targetsizesMB="10 100" | |
destdir=./solr-7971-data | |
mkdir -p $destdir | |
for n in 14 140; do | |
# remove file if there... | |
if [ -f $destdir/input.$n.json ]; then rm -f $destdir/input.$n.json ; fi | |
if [ ! -f $destdir/input.$n.json ]; then | |
echo -n '[{"id":"jsondoc1","content":"' >>$destdir/input.$n.json | |
for i in `seq $n` ; do | |
echo -n $contents >>$destdir/input.$n.json | |
done | |
echo -n '"}]' >>$destdir/input.$n.json | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment