From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <0a1d57f312ab3ed4c2b61d9bf021372b@vitanuova.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] rc question Date: Thu, 23 Mar 2006 12:05:43 +0000 From: rog@vitanuova.com In-Reply-To: <600c7d463e0f6fcfcbef7e6634393713@collyer.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 1d73863c-ead1-11e9-9d60-3106f5b1d025 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.