12-02-2020 12:11 PM
Hello ,
I'm using this to check ping connection .
But it check the result 100 precent .
How can I check the all results like 20,50,80,100 ?
Thank
action 3.7 cli command "do ping 192.168.83.2" action 3.8 regexp "100 percent" "$_cli_result" action 3.9 if $_regexp_result eq "0"
12-03-2020 01:19 AM - edited 12-03-2020 01:20 AM
we need to have full script to understand and quick one
why you using do ?
ping 192.168.83.2
100 means all success all time, you do not get any results of 20 50 or 80 ?
you get results of 100% success or not success ?
what are you expecting ?
12-06-2020 07:27 AM
To match on specific values use regex "or" : regexp "20|40|60|80|100 percent".
Another way to approach is to change 100% to 0% on line 3.8. If it fails to match on 0% it must be some other value.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide