title: How to assign value of xargs command into a variable in bash?
body: <p>I need to assign a variable <code>$x</code> value that returns from the command <code>'file'</code> on <code>$1</code>.
  my code is:</p>
  
  <pre><code>echo $1 | xargs file 'x=$'
  </code></pre>
  
  <p>and the last part <code>x=$</code> does not work.
  I need that if the argument <code>$1</code> is <code>'archive.zip'</code> then the variable <code>x</code> will get the value of the command <code>'file'</code> on it.
  How can I do that?</p>