Created
August 3, 2018 10:16
-
-
Save jumblies/a0a95c74964fd6c089afdf38e23ec028 to your computer and use it in GitHub Desktop.
slow cat of files
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/sh | |
# A program to slowly cat file or standard input. | |
if [ "$1" ] ; then | |
file="$1" | |
else | |
file="-" | |
fi | |
cat "$file" | while read line ; do | |
echo "$line" | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment