Skip to content

Instantly share code, notes, and snippets.

@stekhn
Created December 8, 2017 16:01
Show Gist options
  • Select an option

  • Save stekhn/dab79116f60cce731c41cc4fe557cd1c to your computer and use it in GitHub Desktop.

Select an option

Save stekhn/dab79116f60cce731c41cc4fe557cd1c to your computer and use it in GitHub Desktop.
Bash script to print any document or file line by line with a small, random delay. Nice to fake a "hacking" screen.
#!/bin/bash
while IFS='' read -r line || [[ -n "$line" ]]; do
sleep $(( ( RANDOM % 1 ) + 1 ))
echo "$line"
done < "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment