[ControlTier] cannot get resource attributes

22 views
Skip to first unread message

Raymond Meng

unread,
Sep 17, 2012, 3:51:31 AM9/17/12
to contr...@googlegroups.com
I wanna get the value of &{resource.package-install-root} and I tried below command, but got error:-bash: ${resource.properties.install-root}: bad substitution.
ctl -p demo_coreDev -t file -r createUniq.py -c Get-Properties -- -destfile ${resource.properties.install-root}

I also tried replacing ${resource.properties.install-root} with ${resource.package-install-root}, same error occurred.

is there anyone can help me?

Moses Lei

unread,
Sep 17, 2012, 3:59:04 AM9/17/12
to contr...@googlegroups.com
First make sure the property you want actually is there (run the Properties command with "-- -format plain" to get a list), then escape the $ sign using a backslash-- \${propertyname}.

It should be said that this is not guaranteed to work, because it requires that the command itself do a substitution. Not all commands do such a substitution. But the escaping would at least get you to the next level of debugging.

Moses

--
Moses Lei
[ Professional Services | DTO Solutions, Inc. ]
[ mobile: +1 703.901.5969 | e-mail: ml...@dtosolutions.com | aim/gtalk: ml...@controltier.com | yahoo: moseslei | windows live (msn): ml...@dtosolutions.com ]




--
You received this message because you are subscribed to the Google Groups "ControlTier" group.
To post to this group, send email to contr...@googlegroups.com
To unsubscribe from this group, send email to controltier...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/controltier?hl=en
http://wiki.controltier.org

Raymond Meng

unread,
Sep 17, 2012, 4:28:51 AM9/17/12
to contr...@googlegroups.com
thanks Moses Lei.

Though Get-Properties doesn't work, I can get what I want with a python script parsing the output of Properties command with "-- -format plain".
Reply all
Reply to author
Forward
0 new messages