Gentoo Archives: gentoo-user

From: Albert Hopkins <marduk@×××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Bash & Server Sockets
Date: Fri, 16 Jan 2009 15:18:21
Message-Id: 1232119067.2939.2.camel@centar.nbk
In Reply to: [gentoo-user] Bash & Server Sockets by Hilco Wijbenga
1 On Thu, 2009-01-15 at 21:53 -0800, Hilco Wijbenga wrote:
2 > Hi all,
3 >
4 > In Bash /dev/tcp/host/port can be used to write to a TCP socket. This
5 > works nicely so I was very curious whether it would work the other way
6 > too: is it possible to have a Bash script listen on a particular port
7 > as if it were a server? I couldn't find anything in the Bash manual
8 > about it. Google does find a few examples but they all use nc. But
9 > that's cheating! ;-) Is it possible with just Bash, no extra tools?
10 > (If yes, please enlighten me as to how, obviously I could not get it
11 > to work.)
12
13 ... and some would even say using bash to begin with is cheating.

Replies

Subject Author
Re: [gentoo-user] Bash & Server Sockets Eric Martin <freak4uxxx@×××××.com>