-1

Why such script:

x=xxx
y=yyy
printf -v var "%s %s" "$x" "$y"
printf $var

prints only: xxx

While I expected: xxx yyy

How to force printf not ignore symbols after blank space?

Kenenbek Arzymatov
  • 8,439
  • 19
  • 58
  • 109

1 Answers1

0

How about

#!/bin/bash
x=xxx
y=yyy
var=`printf "%s %s" $x $y`
echo $var

?

Jan Myszkier
  • 2,714
  • 1
  • 16
  • 23