Subject: sh reads byte by byte
To: None <>
From: Manuel Bouyer <>
List: tech-userlevel
Date: 01/20/2007 17:01:08
while trying to see how to speedup audit-packages as used by the bulk builds,
I noticed (using ktrace) that something like this:

while read a b c; do
echo $a $b $c
done < /tmp/file

will read /tmp/file byte by byte. With the current pkg-vulnerabilities
this makes 221909 syscalls. Would there be a way to have it read the
file in a more efficient way (rewriting it in another language is not an
option for now) ?

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference