diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2016-12-14 10:08:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-14 10:08:19 +0200 |
commit | 85ea846fc1982e37bcc24e06c9180365998677c0 (patch) | |
tree | 0c4df52b1f1c7dc1f1ff816bb69fb166d9e7140e | |
parent | e846f38e66deb6c27820f5a8e7cb7d04d1c250bd (diff) | |
parent | 8ca5d6da9640f78b67081f2d1edeb0a6d0ca2120 (diff) |
Merge pull request #879 from bittorf/master
freifunk-common: neigh.sh: work also with unprettyfied JSON output
-rwxr-xr-x | contrib/package/freifunk-common/files/usr/bin/neigh.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/package/freifunk-common/files/usr/bin/neigh.sh b/contrib/package/freifunk-common/files/usr/bin/neigh.sh index 59ea8f914f..468ed7a3e0 100755 --- a/contrib/package/freifunk-common/files/usr/bin/neigh.sh +++ b/contrib/package/freifunk-common/files/usr/bin/neigh.sh @@ -66,7 +66,7 @@ VARS="$VARS neighborLinkQuality:NLQ linkCost:Cost remoteHostname:Host" for HOST in '127.0.0.1' '::1';do json_init - json_load "$( echo /links | nc $HOST 9090 | grep ^'{' )" # remove header/non-json + json_load "$( echo /links | nc $HOST 9090 | sed -n '/^[}{ ]/p' )" # remove header/non-json if json_is_a links array;then json_select links |