Home » Infrastructure » Unix » what is the difference between $x and ${x}
what is the difference between $x and ${x} [message #98629] Wed, 09 February 2005 20:44 Go to next message
Naveen Verma
Messages: 60
Registered: August 2004
Member
Hi
what is the difference between $x and ${x}.

Regards
Ravi
Re: what is the difference between $x and ${x} [message #98630 is a reply to message #98629] Thu, 10 February 2005 02:11 Go to previous message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
Hi,

It's the same. The {} is used to clearly define the variable from other text.

Consider the following:
$ x=123
$ echo "Value=$x"
Value=123
$ echo "Value=$xm"
Value=
$ echo "Value=${x}m"
Value=123m


Best regards.

Frank
Previous Topic: Accessing SQL*plus from a unix Account
Next Topic: what is the difference between getopt, getopts, optarg
Goto Forum:
  


Current Time: Fri Apr 19 08:15:50 CDT 2024