#!/bin/bash i=1 while test $i -lt 520 do cat script | nc 127.0.0.1 5556 &>/dev/null & echo $i i=$(( $i + 1 )) done