Send a file to Kafka
while true; do bin/kafka-console-producer.sh --broker-list $KAFKA --topic test2 < simple.json > k.out; done
Pick a random file and send to Kafka
while true; do bin/kafka-console-producer.sh --broker-list $KAFKA --topic test2 < "$(ls *100.json | shuf | head -1)" > k.out; done
while true; do ksend kafka1 < "$(ls *1e5 | shuf | head -1)" > k.out; done &
Search and Replace
sed 's/100/500/g' < pear.json > pear100.json
Repeat a line a few times
while read line; do for i in {1..100}; do echo "$line"; done; done < apple.json > apple100.json
cat peach.json | perl -ne 'print "$_" x1e2' > peach1e2
Random
ls | shuf | head -1
ls | sort -R | head -1