From 6bde3438c6c0d53f1241fd52d279e487ce0e5cb4 Mon Sep 17 00:00:00 2001 From: William Melody Date: Sun, 17 May 2020 10:34:59 -0700 Subject: [PATCH] Don't use $/${} with arithmetic variables. ShellCheck SC2004 https://github.com/koalaman/shellcheck/wiki/SC2004 --- hosts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts b/hosts index 000f2b7..8b6e506 100755 --- a/hosts +++ b/hosts @@ -412,7 +412,7 @@ _print_entries() { fi done <<< "${_input}" - _max_divided="$((${_max_length} / 8))" + _max_divided="$((_max_length / 8))" while IFS=$'\t ' read -r -a _parts do @@ -423,7 +423,7 @@ _print_entries() { fi _current_divided=$((${#_parts[0]} / 8)) - _tab_count=$((${_max_divided} - ${_current_divided} + 1)) + _tab_count=$((_max_divided - _current_divided + 1)) _tabs="$(printf "%*s" ${_tab_count} | tr " " '\t')" if [[ -n "${_parts[2]:-}" ]]