This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes Bad Substitution Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Bad Substitution" Watch "Bad Substitution" New topic

Bad Substitution

Dinesh Tomar

Joined: Jan 25, 2012
Posts: 1
I have a key name suppose and i want to display its value as
echo ${}
it gives me an error Bad Substitution. Please tell me what to do?
Anayonkar Shivalkar

Joined: Dec 08, 2010
Posts: 1544

Which shell are you using? Dot (.) is not allowed in variable name on bash (I guess ksh supports it).

I hope this helps.

Anayonkar Shivalkar (SCJP, SCWCD, OCMJD, OCEEJBD)
I agree. Here's the link:
subject: Bad Substitution
It's not a secret anymore!