Skip to content

Instantly share code, notes, and snippets.

@iautom8things
Created August 19, 2014 12:31
Show Gist options
  • Save iautom8things/51dea02d5d4a7063c2f7 to your computer and use it in GitHub Desktop.
Save iautom8things/51dea02d5d4a7063c2f7 to your computer and use it in GitHub Desktop.
Concat a random line from one file to another file every few seconds.
do
head -$((${RANDOM} % `wc -l < from_file ` + 1)) from_file | tail -1 >> to_file
sleep 1.5
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment