I am trying to align a set of docker service ps calls together using printf but it seems to align things on the right when I use printf
for service in $(command docker service ls --format "{{.Name}}")
do
command docker service ps \
--format "table {{ .Name | printf \"%20.20s\" }}\t{{ .Image | printf \"%40.40s\" }}\t{{ .Node | printf \"%20.20s\" }}\t{{.CurrentState}}\t{{.Error}}" \
$service
done
How do I make the printf left align?