From 988385b5a31d5453ff0342696db89df8951a8dc8 Mon Sep 17 00:00:00 2001 From: moshix Date: Mon, 17 Apr 2023 05:19:05 -0500 Subject: [PATCH] small enhancements --- nicparseMacos.bash | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/nicparseMacos.bash b/nicparseMacos.bash index ab9e691..f77e4ae 100644 --- a/nicparseMacos.bash +++ b/nicparseMacos.bash @@ -80,7 +80,7 @@ do done -if [[ "$1" == "-e" ]]; then +if [[ "$1" == "-e" ]] || [[ "$1" == "-v" ]]; then if [[ -z "$2" ]]; then delay=1.4 ext=`timeout $delay curl ifconfig.me 2>/dev/null` @@ -122,11 +122,6 @@ else fi -if [[ "$1" == "-v" ]]; then - echo -e "${white}Version "$version"${reset}" -fi - -os_type # call os type determination if [[ "$ostype" == "Linux" ]]; then routenic=`route | grep '^default' | grep -o '[^ ]*$'` # for Linux echo -e "${blue}NIC to Internet: \t${white}$routenic${reset}" @@ -143,3 +138,7 @@ if [[ -z "$dnscheck" ]]; then else echo -e "${blue}DNS config: \t\t${white}OK ${reset}" fi + +if [[ "$1" == "-v" ]]; then + echo -e "${cyan}Version:\t\t"${white}$version"${reset}" +fi