From 178663507b390ff039c26b9156995ee0ff95a287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?b=CA=B0edoh=E2=82=82=20sw=C3=A9?= Date: Mon, 16 Dec 2024 22:46:50 +0500 Subject: [PATCH] Minor fixes. --- dobroho_vechora.bash | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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}"