From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] v8 shell In-Reply-To: Your message of "Sun, 16 Nov 2003 11:45:35." <2cd42c087fdb421f50167b5b1bc9d4dc@hamnavoe.com> From: "Russ Cox" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19365.1068992611.1@t40.swtch.com> Message-Id: Date: Sun, 16 Nov 2003 09:23:31 -0500 Topicbox-Message-UUID: 8ae1cba2-eacc-11e9-9e20-41e7f4b1d025 > > tar c . | tee >{wc -c} | @{cd somewhere; tar x} > > Wow - I use <{cmd} a lot but I had never realised that >{cmd} works too. > > What I do miss in rc (does any other shell do it?) is the ability to > open a read-write connection to a file. For example you could test > webcookies(4) by doing something like: > > <>[4]/mnt/webcookies/http { echo http://www.foo.baz >[1=4]; cat <[0=4] } > > Because the webcookies protocol requires that you write the url and read back > the cookies on the same file descriptor, I can't see any way to do this in > the existing shell. i put this in byron's rc once but didn't bother trying to convince anyone it was actually useful on unix (especially since some more magic was required to open unix domain sockets transparently). for lockstep protocols (one write, one read, ...) you can use aux/rdwr. echo plan9.bell-labs.com mx | aux/rdwr /net/dns there should be an option to silence the "> " prompts.