Use ternary operator

This commit is contained in:
dteske 2016-12-12 19:24:32 +00:00
parent aa6fdf05e8
commit 66586c3cda

View File

@ -96,10 +96,7 @@ dialog_country_select()
for (i = 1; i <= NF; i++) {
printf "%s", $i
if ($i ~ /[[:lower:]]/)
if ($(i+1) ~ /[[:lower:]]/)
printf "\\\\\\ "
else
printf "\n"
printf $(i+1) ~ /[[:lower:]]/ ? "\\\\\\ " : "\n"
else
printf " "
}