Extract certain lines from a Nginx version info Extract certain lines from a Nginx version info nginx nginx

Extract certain lines from a Nginx version info


I had to use a file write to get the values from the output I need

nginx -V &> testawk -F'arguments:' '{print $2}' test

Hope this helps anyone looking for similar problem


For reference, it may not be perfect

$ nginx -V 2>&1  | awk -F 'arguments:' '{print $NF}' | sed -n '$p'