title: How to access a return value from a node script in BASH?
body: <p>Let's say I have a bash script that calls a node script. I've tried to do it like this:</p>
  
  <p>b.sh file:</p>
  
  <pre><code>#!/bin/bash
  v=$(node app.js)
  echo "$v"
  </code></pre>
  
  <p>app.js file:</p>
  
  <pre><code>#!/usr/bin/env node
  function f() {
     return "test";
  }
  return f();
  </code></pre>
  
  <p>How do I access the value returned by the node script ("test") from my bash script ?</p>