karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: Gogo scripts and feature:list
Date Tue, 05 Sep 2017 09:04:17 GMT
Hi Jérémie,

I think you can go directly with the features list:

features = $.context features) | grep -i xxx | tac
if features.size() ...

Regards
JB

On 09/05/2017 10:54 AM, J. Brebec wrote:
> Hello,
> 
> I want to detect, in a gogo script, if at least N features are installed in Karaf (in
order to show an "help" message).
> 
> I am trying to do something like :
> 
> featuresCount = (features:list -r | grep xxx | wc -l)
> 
> however, I can't test featuresCount because it's not a number (wc -l seem to return a
string with two values..) How can I make such test in karaf/gogo ?
> 
> Regards,
> Jérémie
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message