You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Jean-Baptiste Onofré (Updated JIRA)" <ji...@apache.org> on 2011/09/30 08:32:45 UTC
[jira] [Updated] (KARAF-908) Provide a way to access system
properties easily in the shell
[ https://issues.apache.org/jira/browse/KARAF-908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jean-Baptiste Onofré updated KARAF-908:
---------------------------------------
Component/s: karaf-shell
Fix Version/s: 3.0.0
> Provide a way to access system properties easily in the shell
> -------------------------------------------------------------
>
> Key: KARAF-908
> URL: https://issues.apache.org/jira/browse/KARAF-908
> Project: Karaf
> Issue Type: New Feature
> Components: karaf-shell
> Reporter: Guillaume Nodet
> Fix For: 3.0.0
>
>
> There's no easy way to access system properties in the shell.
> Something like:
> {code}
> > echo ${karaf.name}
> {code}
> should print the system property if the session has no property named karaf.name defined.
> As a workaround, the following script can be used:
> {code}
> system-property = { ((($.context bundle) loadClass java.lang.System) getMethod getProperty java.lang.String) invoke null $1 }
> echo "$(system-property karaf.name)"
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira