#!/bin/bash
aramatarama ()
{
local mesaj="$1"
local port="$2"
sayac=0
while (( ${#list[@]} > sayac ))
do
if (( $(jobs -p | wc -l) > 150 ))
then
sleep 5s
continue
fi
echo -n $mesaj | nc -w 5 ${list[sayac]} $port &
let "sayac = sayac + 1"
done
}
list=(192.168.1.{1..255})
list=(192.168.{1..255}.{1..255})
aramatarama "Merhaba Beni BUL adim GARAVEL" "6677"
exit
Categories: Bash language
279 Comments