9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: rog@vitanuova.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] rc question
Date: Thu, 23 Mar 2006 12:05:43 +0000	[thread overview]
Message-ID: <0a1d57f312ab3ed4c2b61d9bf021372b@vitanuova.com> (raw)
In-Reply-To: <600c7d463e0f6fcfcbef7e6634393713@collyer.net>

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.



  parent reply	other threads:[~2006-03-23 12:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-17 21:09 erik quanstrom
2006-03-17 21:46 ` Lyndon Nerenberg
2006-03-18  6:20   ` lucio
2006-03-18  7:32     ` Bruce Ellis
2006-03-18  8:58       ` lucio
2006-03-18 12:34         ` Bruce Ellis
2006-03-18 13:30           ` lucio
2006-03-18  7:37     ` geoff
2006-03-18  7:38       ` Bruce Ellis
2006-03-18  9:02       ` lucio
2006-03-23 12:05       ` rog [this message]
2006-03-24  0:53         ` geoff
2006-03-17 22:08 ` Charles Forsyth
2006-03-17 22:11   ` Charles Forsyth
  -- strict thread matches above, loose matches on Subject: below --
2006-03-24 14:39 erik quanstrom
2006-03-24 17:26 ` Ronald G Minnich
2006-03-24 18:22   ` erik quanstrom
2006-03-18 13:02 erik quanstrom
2006-03-17 21:50 erik quanstrom
2006-03-17 21:06 erik quanstrom
2006-06-30 18:23 ` Abhey Shah
2006-06-30 18:33 ` matt
2006-06-30 20:06   ` quanstro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0a1d57f312ab3ed4c2b61d9bf021372b@vitanuova.com \
    --to=rog@vitanuova.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).