Meaningless Drivel is fun!*
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Bad Substitution" Watch "Bad Substitution" New topic
Author

Bad Substitution

Dinesh Tomar
Greenhorn

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

Joined: Dec 08, 2010
Posts: 1502
    
    5

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

I hope this helps.


Regards,
Anayonkar Shivalkar (SCJP, SCWCD, OCMJD, OCEEJBD)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Bad Substitution
 
Similar Threads
Has anyone learned C#?
Regarding overriding
Inheritence
need a substitute for XYLayout class in "com.borland.jbcl.layout" package
ksh script - (Not Java related) - Child script name