Apparently `varnishd -V` writes to `stderr` not `stdout`. In order to pipe the result into `grep`, you will need to redirect the stream e.g.
varnishd -V 2>&1 | grep -P '(?<=varnish-)[0-9.]+' -o
Apparently `varnishd -V` writes to `stderr` not `stdout`. In order to pipe the result into `grep`, you will need to redirect the stream e.g.
varnishd -V 2>&1 | grep -P '(?<=varnish-)[0-9.]+' -o