On Linux: Using bash: % read < /proc/sys/kernel/random/poolsize ; echo $REPLY 4096 Using Busybox 1.19.3: ./sh -c 'read < /proc/sys/kernel/random/poolsize ; echo $REPLY' 4 ./cat < /proc/sys/kernel/random/poolsize 4096
See also: http://us.generation-nt.com/answer/bug-595063-read-builtin-doesnt-read-integer-value-proc-files-but-bash-does-help-200150061.html and: https://lkml.org/lkml/2011/12/21/309