V
V
Viktor Taran2019-03-27 12:34:47
bash
Viktor Taran, 2019-03-27 12:34:47

Non-working output to stdou?

Good afternoon, this is the second time I've come across this conclusion.
How it is done and why it is impossible to work with it
nginx -V | grep ляляля

stdou
nginx -V | grep aaadfa
nginx version: nginx/1.14.0 (Ubuntu)
built with OpenSSL 1.1.0g 2 Nov 2017 (running with OpenSSL 1.1.1b 26 Feb 2019)
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fdebug-prefix-map=/build/nginx-FIJPpj/nginx-1.14.0=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_geoip_mod

At the beginning I thought that this is such a line, but neither sed nor anything else parses the line, it seems to be there but it is not there.
Where does the output go and how to catch it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2019-03-27
@shambler81

Goes to stderr, to send it to grep do this:
nginx -V 2>&1 | grep...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question