9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "David Leimbach" <leimy2k@gmail.com>
To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu>
Subject: Re: [9fans] netcat, the only stdin/stdout redirector to tcp/udp conns?
Date: Tue,  4 Apr 2006 13:44:13 -0700	[thread overview]
Message-ID: <3e1162e60604041344q77a43270kee40aa4a606b4afe@mail.gmail.com> (raw)
In-Reply-To: <20060404194312.GA11874@imsa.edu>

On 4/4/06, Paul Hebble <maceo@imsa.edu> wrote:
> On Tue, Apr 04, 2006 at 09:34:56PM +0200, "Nils O. Selåsdal" wrote:
> > Lluís Batlle i Rossell wrote:
> > >Am I missing something? Which is the program I'm expecting to find for
> > >that redirection?
>
> It's always the one you least expect:
>
>        Bash handles several filenames  specially  when  they  are
>        used in redirections, as described in the following table:
>
>               /dev/tcp/host/port
>                      If  host  is  a  valid  hostname or Internet
>                      address, and port is an integer port  number
>                      or service name, bash attempts to open a TCP
>                      connection to the corresponding socket.
>               /dev/udp/host/port
>                      If host is  a  valid  hostname  or  Internet
>                      address,  and port is an integer port number
>                      or service name, bash attempts to open a UDP
>                      connection to the corresponding socket.
>
> (Sorry for the weird quoting, I already deleted Lluís's email, so I had to
>  wait for another reply to get on the thread.)
>

It's worth noting /dev/tcp is part of bash.  zsh has it's own ways of
doing the same stuff.  netcat is *not* the only way to do this stuff
on unix... it just appears to be the only shell-agnostic way.

Dave

> --
>         Paul
>


  parent reply	other threads:[~2006-04-04 20:44 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-04 19:11 Lluís Batlle i Rossell
2006-04-04 19:34 ` "Nils O. Selåsdal"
2006-04-04 19:43   ` Paul Hebble
2006-04-04 20:36     ` Lluís Batlle i Rossell
2006-04-05  0:36       ` matt
2006-04-04 20:44     ` David Leimbach [this message]
2006-04-04 20:53       ` uriel
2006-04-04 21:20     ` Lluís Batlle i Rossell
2006-04-04 22:10       ` Bruce Ellis
2006-04-05  2:32         ` David Leimbach
2006-04-05 16:54         ` Aharon Robbins
2006-04-04 23:46       ` geoff
2006-04-05  1:05     ` Anthony Sorace
2006-04-05  2:21       ` Ronald G Minnich
2006-04-05  2:35         ` David Leimbach
2006-04-05  2:39           ` geoff
2006-04-05  2:45             ` David Leimbach
2006-04-05  2:50               ` geoff
2006-04-05  4:38                 ` [9fans] netcat, Skip Tavakkolian
2006-04-05  4:41                   ` geoff
2006-04-05  4:54                     ` Skip Tavakkolian
2006-04-05  4:46                   ` Bruce Ellis
2006-04-05  6:02                   ` Adrian Tritschler
2006-04-05 15:50                   ` Jack Johnson
2006-04-05 16:55                     ` David Leimbach
2006-04-05  2:44           ` [9fans] netcat, the only stdin/stdout redirector to tcp/udp conns? Ronald G Minnich
2006-04-05  4:38             ` Bruce Ellis
2006-04-05  4:56             ` Skip Tavakkolian
2006-04-04 20:17 ` Russ Cox
2006-04-04 20:41   ` Lluís Batlle i Rossell
2006-04-04 22:45 ` Harri Haataja
2006-04-04 23:33 ` Taj Khattra
2006-04-05 10:34 ` Heiko Dudzus

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=3e1162e60604041344q77a43270kee40aa4a606b4afe@mail.gmail.com \
    --to=leimy2k@gmail.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).