title: How do I assign the output of a command to a variable in Jupyter notebook?
body: <p>Is there a way to assign a value to a variable, that value which we get in terminal by writing any command?</p>
  
  <p>I try with this code:</p>
  
  <pre><code>!number_of_lines=$(wc -l &lt; cord_19.json)
  !echo $number_of_lines
  </code></pre>
  
  <p>I get empty output. 
  When I run </p>
  
  <pre><code>!wc -l &lt; cord_19.json
  </code></pre>
  
  <p>I get correct response with number.</p>
  
  <p>Do you have idea what is wrong or how can I set variable?</p>