Use read to avoid cat's buffering.