Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

FILTER EXPRESSIONS can use... #17

Open
zhaoge26 opened this issue May 5, 2015 · 4 comments
Open

FILTER EXPRESSIONS can use... #17

zhaoge26 opened this issue May 5, 2015 · 4 comments

Comments

@zhaoge26
Copy link

zhaoge26 commented May 5, 2015

Hi, starting to learn how to use icli.
Tried this two commands:

$ icli -h servername # I can get what I want
$ icli -z!o,!A,!S,!D
-bash: !o,!A,!S,!D: event not found
this is copied from the man file, but failed...I think the bash should be the reason.

then I tried copy the command to a script, then run it, got an error:
Use of uninitialized value in numeric ne (!=) at /usr/local/bin/icli line 242.

Know little about perl, can you help...

@derf
Copy link
Owner

derf commented May 5, 2015

bash uses ! for history expansion, so you need to quote it: icli -z'!o,!A,!S,!D' should do the trick.

@derf derf closed this as completed May 5, 2015
@zhaoge26
Copy link
Author

zhaoge26 commented May 5, 2015

Thanks for your reply.
Actually, tried that, same error:
Use of uninitialized value in numeric ne (!=) at /usr/local/bin/icli line 242.

@derf
Copy link
Owner

derf commented May 7, 2015

I can't reproduced that here. which icli version are you using?

@derf derf reopened this May 7, 2015
@zhaoge26
Copy link
Author

zhaoge26 commented May 7, 2015

Thanks for your reply.

I installed v0.48 on Centos 6.4, I'm using Icinga 2. Downloaded icli from this page : http://finalrewind.org/projects/App-Icli/
Installed it :

perl Build.PL
./Build
sudo ./Build install

I tested, the command works fine:

icli -vvv www/load

Host : www
Service : load
Status : OK (for 36d 10h 42m 1s)
.......

But when I try icli -z'!o,!A,!S,!D' , it showed the error...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants