diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-05-26 23:49:28 +0300 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-05-26 23:49:28 +0300 |
commit | 70ce60fdb0735ec0887e54e826adcd14269b4d40 (patch) | |
tree | 014a2e701fcef1a24d1fa8871edf5fd23c651380 /plugins.d | |
parent | dbe9a655193ede02450e555c2db67ceb3cb78fab (diff) |
replaced egrep with grep - the { character should be escaped for egrep; fixes #2197
Diffstat (limited to 'plugins.d')
-rwxr-xr-x | plugins.d/cgroup-name.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins.d/cgroup-name.sh b/plugins.d/cgroup-name.sh index a1e3abe081..e17193edaa 100755 --- a/plugins.d/cgroup-name.sh +++ b/plugins.d/cgroup-name.sh @@ -89,7 +89,7 @@ function get_name_api { return 1 fi info "Running API command: /containers/${DOCKERID}/json" - JSON=$(echo -e "GET /containers/${DOCKERID}/json HTTP/1.0\r\n" | nc -U /var/run/docker.sock | egrep '^{.*') + JSON=$(echo -e "GET /containers/${DOCKERID}/json HTTP/1.0\r\n" | nc -U /var/run/docker.sock | grep '^{.*') NAME=$(echo $JSON | jq -r .Name,.Config.Hostname | grep -v null | head -n1 | sed 's|^/||') return 0 } |