On Thu, Jun 21, 2018 at 12:44:14AM +0200, Tomasz Rola wrote: [...] > => (591 60): cat nread > #!/bin/sh > > # nread n - read up to n bytes from stdio, put them on to stdout > > N=$1 > > dd bs=512 count=$((N / 512)) iflag=fullblock 2>/dev/null > dd bs=1 count=$((N % 512)) iflag=fullblock 2>/dev/null
Craps. I have consulted OpenBSD's manpage for dd and there is no mention of iflag. So this will not work on OpenBSD. I will have to rethink this, sorry. -- Regards, Tomasz Rola -- ** A C programmer asked whether computer had Buddha's nature. ** ** As the answer, master did "rm -rif" on the programmer's home ** ** directory. And then the C programmer became enlightened... ** ** ** ** Tomasz Rola mailto:tomasz_r...@bigfoot.com **