Formatting

This commit is contained in:
Bob Mottram 2016-11-21 18:13:41 +00:00
parent 801e0569fd
commit f4c776bdf5
1 changed files with 2 additions and 2 deletions

View File

@ -96,8 +96,8 @@ function pad_string {
total_padding=$((128 - str_length)) total_padding=$((128 - str_length))
leading_padding=$((1 + RANDOM % $total_padding)) leading_padding=$((1 + RANDOM % $total_padding))
trailing_padding=$((total_padding - leading_padding)) trailing_padding=$((total_padding - leading_padding))
leading=printf "%-${leading_padding}s" leading=$(printf "%-${leading_padding}s")
trailing=printf "%-${trailing_padding}s" trailing=$(printf "%-${trailing_padding}s")
echo "${leading}${pass_string}${trailing}" echo "${leading}${pass_string}${trailing}"
} }