I'm trying to pad spaces onto a series of strings in bash, using the printf
suggestions outlined here and here.
Iterating over test characters...
for i in a b c d e f g
do
printf "%-7s" "$i"
done
...produces expected results:
a b c d e f g
But iterating over the actual strings produces strange results:
for i in date sha percent total covered uncovered
do
printf "%-7s" "$i"
done
date sha percenttotal covereduncovered
Why do those two iterations result in different spacing?