Is "cat" too fast for you too?

These modern day computers are so fast, that "cat"-ting a file scrolls by at an unreadable speed!

Here is a small shell script to slowly cat files or standard input:

#!/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

And here is how to use it:

$ scat mylongfile
line 1
line 2
line 3
$ cat mylongfile | scat
line 1
line 2
line 3

Amazing what computers can do!

About Consultancy Articles Contact




References Red Hat Certified Architect By Robert de Bock Robert de Bock
Curriculum Vitae By Fred Clausen +31 6 14 39 58 72
By Nelson Manning robert@meinit.nl