Command
Nginx-v > Nginx.txtcat-n nginx.txt | Sed-n ' 5,18p ' | awk ' {$1= ' ";p rint} ' | Sed ' s/^[]*//g ' | TR ' n ' ', ' | Sed-n ' S/,//GP ' | TR "" \ n "
Results
configurearguments:--user=nginx--group=nginx--prefix=/usr/share/nginx--sbin-path=/usr/sbin/nginx--conf-path=/ etc/nginx/nginx.conf--error-log-path=/var/log/nginx/error.log--http-log-path=/var/log/nginx/ Access.log--http-client-body-temp-path=/var/lib/nginx/tmp/client_body--http-proxy-temp-path=/var/lib/nginx/tmp /proxy--http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi--http-uwsgi-temp-path=/var/lib/nginx/tmp/ uwsgi--http-scgi-temp-path=/var/lib/nginx/tmp/scgi--pid-path=/var/run/nginx.pid--lock-path=/var/lock/subsys/ Nginx--with-http_ssl_module--with-http_spdy_module--with-http_v2_module--with-http_realip_module--with-http_ Addition_module--with-http_xslt_module--with-http_image_filter_module--with-http_sub_module--with-http_dav_ Module--with-http_flv_module--with-http_gzip_static_module--with-http_secure_link_module--with-http_ Degradation_module--with-http_stub_status_module--with-debug--with-http_sysguard_module--with-http_upstream_ check_module--with-http_lua_module--with-http_dyups_module--with-luajit-lib=/usr/lib--with-luajit-inc=/usr/include/luajit-2.0
Explain:
awk ' {$1= ' ";p rint} '
Outputs the 2nd column to the last column (that is, excluding the first column)
Sed ' s/^[]*//g '
Remove spaces from the beginning of the line
TR ' n ' ', ' | Sed-n ' S/,//GP '
Remove line breaks, replace newline characters with commas (or #¥%&, etc.) and then delete them by commas
Shell format output nginx compiler parameters