From a2152446eafd714948b8c52824457e8382075918 Mon Sep 17 00:00:00 2001 From: William Wernert Date: Tue, 16 Nov 2021 11:08:13 -0500 Subject: [PATCH] Pad count string to align text --- setup/so-preflight | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup/so-preflight b/setup/so-preflight index 9515f922c..3050c94cb 100755 --- a/setup/so-preflight +++ b/setup/so-preflight @@ -147,8 +147,9 @@ __check_url_arr() { [[ $count != 1 ]] && sleep $retry_sleep status=$(curl -s -o /dev/null -w "%{http_code}" -L "$url" 2> /dev/null) ret=$? - - [[ $ret != 0 ]] && echo "$warning_prefix ($count/$retry_count) Could not reach $url, curl error code: $ret" >> "$preflight_log" + local count_str + printf -v count_str '%02d' "$count" + [[ $ret != 0 ]] && echo "$warning_prefix ($count_str/$retry_count) Could not reach $url, curl error code: $ret" >> "$preflight_log" done if [[ $ret == 0 ]]; then