title: Bash, assigning command output to a variable
body: <p>I am trying to automate the installation of nginx on multiple servers, and I have a shell script. It runs a version check if nginx is already installed and its version.</p>
  
  <p>Trying to assign <code>TMP=$(nginx -v)</code>, and instead of storing it in the variable it prints the results to console. <code>printf "$TMP"</code> prints an empty string</p>