-2

I ran into a strange problem that I do not understand. Why are multiple spaces not present in the output of the following command?

$ d='A      B'
$ echo $d
A B

Cyrus
  • 84,225
  • 14
  • 89
  • 153
user52366
  • 1,035
  • 1
  • 10
  • 21

1 Answers1

0

use in double quotes:

echo "$d"
tso
  • 4,732
  • 2
  • 22
  • 32