# Exec not work

**URL:** <https://community.openhab.org/t/exec-not-work/13892>\
**Category:** Scripts & Rules\
**Tags:** exec, rules\
**Created:** [September 6, 2016, 11:50am UTC](https://community.openhab.org/t/exec-not-work/13892 "2016-09-06T11:50:34Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ThomDietrich](https://community.openhab.org/user_avatar/community.openhab.org/thomdietrich/32/71239_2.png) [@ThomDietrich](https://community.openhab.org/u/ThomDietrich)\
**Post date:** [September 6, 2016, 1:53pm UTC](https://community.openhab.org/t/exec-not-work/13892/2 "2016-09-06T13:53:59Z")

</div>

Hello, this can be solved multiple ways.

- you should be able to find the right solution with “@@”, sorry I can’t tell for sure without testing
- you can create an extra script file pingtest.sh and call this one to avoid using “@@”
- you can abandon grep and awk all together and just do the preprocessing in “java-like” xtend syntax in your rules file

Why are you interested in the count of packages received? If you want to know if you are online you can use the [network binding](http://docs.openhab.org/addons/bindings/network/readme.html), you might also want to look at the [speedtest example](https://community.openhab.org/t/speedtest-cli-integration/7611)

---

_[View the full topic](https://community.openhab.org/t/exec-not-work/13892)._
