diff --git a/dobroho_vechora.bash b/dobroho_vechora.bash index a303ffc..8ff016d 100755 --- a/dobroho_vechora.bash +++ b/dobroho_vechora.bash @@ -2,17 +2,15 @@ set -e ip="${1}" port="${2}" -[ -z "${ip}" ] && print_usage 'No IP given.' -[ -z "${port}" ] && print_usage 'No port given.' -[ -z "${3}" ] || print_usage 'Too many arguments.' -get_termsize() { - echo "`expr $(stty -a < $(tty) | grep -Po '(?<=rows )\d+') - 1`" -} + print_usage() { echo "${1}" echo "${0} " exit } +[ -z "${ip}" ] && print_usage 'No IP given.' +[ -z "${port}" ] && print_usage 'No port given.' +[ -z "${3}" ] || print_usage 'Too many arguments.' send_message() { exec 3<> "/dev/tcp/${ip}/${port}"