Use read instead of /dev/stdin.