alias read {
if (!$isfile($$1 $+ .txt)) { echo -a error: file $$1 $+ . txt not found. | return }
echo -a $timestamp Counting words of $$1 $+ .txt
var %counter = 1, %wordcount
while ($read($$1 $+ .txt,%counter)) {
inc %wordcount $numtok($read($$1 $+ .txt,%counter),32)
inc %counter
}
echo -a $timestamp The file $$1 $+ .txt has %wordcount words in it.
}