File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 1545

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!