0

Consider the following code:

name=John

echo ${name}

It prints "John", just as expected. Now consider this code:

name=John

echo $name

Again, this code prints "John" just as expected. Both codes work fine.

But I wonder is there any difference between the two, e.g. compatibility?

A. G.
  • 11
  • 4

1 Answers1

1

In your case, there is no difference.

In this case, there is:

name=John

echo ${name}Doe
echo $nameDoe

Read more: here

e.dan
  • 7,275
  • 1
  • 26
  • 29