title: How to acquire a file path with another program in Linux terminal?
body: <p>Let's say I want to save the path of a file to a variable in Linux terminal. I could do it like this:
  <code>VARIABLE=/home/john/Documents/example.txt</code></p>
  
  <p>Is there a way to do this with another program like Ranger for example? In pseudo-code:</p>
  
  <pre><code>echo "Choose a file:"
  // launch Ranger
  // return a file path into a variable
  echo $example_variable
  // prints the file you chose with Ranger
  </code></pre>