9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] dup(3)
Date: Fri, 16 Oct 2009 12:06:34 -0400	[thread overview]
Message-ID: <a91b4a203f311849ca8d62c4e5fc32ef@brasstown.quanstro.net> (raw)
In-Reply-To: <<138575260910160858nfc9444fr73e3328d98eac98a@mail.gmail.com>>

> @{builtin cd $1 && tar cf /fd/1 .} | @{builtin cd $2 && tar xTf /fd/0}
> instead of
> {builtin cd $1 && tar c .} | {builtin cd $2 && tar xT}

consider,
	; one=/bin; two=/tmp; cd /
	; @{builtin cd $one} | @{builtin cd $two} ; pwd
	/
	; {builtin cd $one} | {builtin cd $two} ; pwd
	/tmp

you don't want to change the cwd of the caller.  that
would be antisocial.

- erik



       reply	other threads:[~2009-10-16 16:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<138575260910160858nfc9444fr73e3328d98eac98a@mail.gmail.com>
2009-10-16 16:06 ` erik quanstrom [this message]
2009-10-16 15:58 hugo rivera
2009-10-16 16:52 ` Russ Cox
2009-10-16 17:25 ` Steve Simon
2009-10-19  9:10   ` hugo rivera

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=a91b4a203f311849ca8d62c4e5fc32ef@brasstown.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /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).