Could someone explain me the difference between these two cases and tell me why $b is empty? Thank you.
$ a=$(uname -o)
$ echo $a
GNU/Linux
$ b=$(nginx -v)
nginx version: nginx/1.17.4
$ echo $b
$ _
I was expecting to use the version of Nginx installed to download its source code, something like this:
$ wget http://nginx.org/download/nginx-$(nginx -v | cut -d"/" -f2).tar.gz
--2019-09-27 20:06:54-- http://nginx.org/download/nginx-.tar.gz
HTTP request sent, awaiting response... 404 Not Found
Using: GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)