114
rated 0 times
[
117]
[
3]
/ answers: 1 / hits: 17640
/ 7 Years ago, sun, april 2, 2017, 12:00:00
Let's say I have a bash script that calls a node script. I've tried to do it like this:
b.sh file:
#!/bin/bash
v=$(node app.js)
echo $v
app.js file:
#!/usr/bin/env node
function f() {
return test;
}
return f();
How do I access the value returned by the node script (test) from my bash script ?
More From » node.js