1
0
mirror of https://github.com/octoleo/hosts.git synced 2024-11-24 13:47:35 +00:00

Don't use $/${} with arithmetic variables.

ShellCheck SC2004
https://github.com/koalaman/shellcheck/wiki/SC2004
This commit is contained in:
William Melody 2020-05-17 10:34:59 -07:00
parent ca43d92d85
commit 6bde3438c6

4
hosts
View File

@ -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]:-}" ]]