[zeromq-dev] Bash Binding

Pieter Hintjens ph at imatix.com
Sat Nov 23 11:36:24 CET 2013


Hi Evan,

It's the V/H/S of protocol stacks... if you ever intend to use this,
consider making it an official ZeroMQ project.

-Pieter

On Sat, Nov 23, 2013 at 1:26 AM, Evan Gates <evan.gates at gmail.com> wrote:
> I came across the Bash Binding here http://zeromq.org/bindings:bash
>
> zmq_push () { m=$(cat) && echo \
>     -e $(printf '\\x01\\x00\\x%02x\\x00%s' \
>     $((1 + ${#m})) "$m") | nc -q1 $@; }
>
> and I was slightly horrified. Awesome idea, scary implementation. It
> can't handle null bytes, messages over 254 bytes, and uses a non
> standard tool (nc). So I decided to spruce it up a bit for fun.
>
> I looked into creating a complete ZMQ implementation but bash doesn't
> support listening sockets yet.
>
> https://bitbucket.org/emg/tidbits/src/bd9a73ffee30ecb220e7f7763bec342ecd3bf315/zmq/zmq.bash?at=master
>
> Enjoy!
>
> -Evan
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev



-- 
-
Pieter Hintjens
CEO of iMatix.com
Founder of ZeroMQ community
blog: http://hintjens.com



More information about the zeromq-dev mailing list