[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] [olug] Bash TCP scripting



On Dec 28, 2007, at 3:32 PM, Travis Owens wrote:
Just out of curiosity, has anyone ever done any scripting with bash, using /dev/tcp or some form of socket connections? I'm looking at doing something bi-directional, receiving the response after the connection is established,
parsing it, using a piece to send back and parsing the final response.

Why bash? Are you writing a client or a server or both?

I'm a big fan of Perl's IO::Multiplex. Here's a chat server in 20 lines of code:

http://search.cpan.org/~bbb/IO-Multiplex-1.09/lib/IO/ Multiplex.pm#A_server_example

Cheers,

j
Omaha Perl Mongers: http://omaha.pm.org