geoff:
>       <>[4]/net/dns { echo google.com ip  >[1=4]; cat <[0=4] }

if you're expecting the cat to start at offset 0, you'd be mistaken
(the dup only ups the refcount on the underlying Chan,
so the seek offsets are shared).

cpu% echo one two three four five six > x
cpu% 
cpu% <>[4] x {echo xxx >[1=4]; cat <[0=4]}
 two three four five six
cpu% cat x
xxx
 two three four five six
cpu%

you can probably do it with dd. the "read" command in inferno
is a more direct analog of the system call, and allows a "-o" flag
to set the offset. i found it quite often useful to know that one
is getting one and only one (p)read.

Reply via email to