I and trying to execute a node.js CLI program which takes an input from user to decide the next step.
I am able to start the program by
node index.js
after this I want to send 1
as input. Is there a way I can give input to my node.js program.
My dumb brain came up with following script
--Script.sh--
node index.js
1
2
which obviously didn't work.