9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] dup(3)
@ 2009-10-16 15:58 hugo rivera
  2009-10-16 16:52 ` Russ Cox
  2009-10-16 17:25 ` Steve Simon
  0 siblings, 2 replies; 5+ messages in thread
From: hugo rivera @ 2009-10-16 15:58 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I am having a hard time understanding the dircp script and the dup(3)
device. What's exactly the purpose of writing
@{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}
I also had a look to the pdf2ps script, and there, it seems to be
useful given that you must  provide a file trough the option
arguments. But for me this looks like a very narrow application for
the device. What other uses dup(3) might have?
Saludos

--
Hugo



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-10-19  9:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <<138575260910160858nfc9444fr73e3328d98eac98a@mail.gmail.com>
2009-10-16 16:06 ` [9fans] dup(3) erik quanstrom
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

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).