Artificial intelligent assistant

Try to grep out varnish version does not work I try to read the varnish version from a Linux Command line, but the following does not work: varnishd -V | grep -P '(?<=varnish-)[0-9.]+' -o This always returns this varnishd (varnish-3.0.3 revision 9e6a70f) Copyright (c) 2006 Verdens Gang AS Copyright (c) 2006-2011 Varnish Software AS instead of just this 3.0.3 Any hints on what I do wrong? Thanks

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

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 21b262458de4792330d20fdea28b4885