Version 2

    This script can be used to test tcp/udp connections with bash.

    It takes a string of <host> <port> <tcp|udp>

    tcp/udp is optional, the default is tcp.

     

    Example:  host1 22 udp host2 523 host3 975 tcp host4 22 host5 80