Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simulate work in a directory adding and updating files
#!/bin/bash
while true; do
filename=$(((RANDOM %10) + 1))
if [ -f $filename ]; then
mkfile 30m data/$filename
else
randomstring=$(LC_CTYPE=C tr -dc A-Za-z0-9 < /dev/urandom | fold -w ${1:-$(((RANDOM %1000000) +1))} | head -n 1)
echo $randomstring >>data/$filename
fi
git add data/$filename
git commit -m "updated $filename"
sleep 2
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.