BASH:Why is printf to a var removing spaces?

前端 未结 0 1200
你的背包
你的背包 2020-12-29 07:56

Why is the output of these two different? I want the spaces to be preserved.

#!/bin/bash

x="foo"
printf "%-12s *" $x

echo " "
         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题