script(1): work around slow reading child
PR: 260938
(cherry picked from commit c0ba4c2ee2c48ec9892d10c0aca797f3685c53ee)