mirror of
https://github.com/octoleo/hosts.git
synced 2024-11-24 21:57:35 +00:00
Don't use $/${} with arithmetic variables.
ShellCheck SC2004 https://github.com/koalaman/shellcheck/wiki/SC2004
This commit is contained in:
parent
ca43d92d85
commit
6bde3438c6
4
hosts
4
hosts
@ -412,7 +412,7 @@ _print_entries() {
|
|||||||
fi
|
fi
|
||||||
done <<< "${_input}"
|
done <<< "${_input}"
|
||||||
|
|
||||||
_max_divided="$((${_max_length} / 8))"
|
_max_divided="$((_max_length / 8))"
|
||||||
|
|
||||||
while IFS=$'\t ' read -r -a _parts
|
while IFS=$'\t ' read -r -a _parts
|
||||||
do
|
do
|
||||||
@ -423,7 +423,7 @@ _print_entries() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
_current_divided=$((${#_parts[0]} / 8))
|
_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')"
|
_tabs="$(printf "%*s" ${_tab_count} | tr " " '\t')"
|
||||||
|
|
||||||
if [[ -n "${_parts[2]:-}" ]]
|
if [[ -n "${_parts[2]:-}" ]]
|
||||||
|
Loading…
Reference in New Issue
Block a user