2

Following the answer given at Is there a JavaScript shell?

That requires me to always execute

var shell=require("/usr/local/lib/node_modules/shelljs");

It seems like node forces execute a script and read stdin to be mutally exclusive so i tried

cat ~/.jshrc /dev/stdin | node 

Which works expect that node output is not printed immediately. Can the pipe echo earlier or is there another way to do it like adding a special file that is always executed?

user877329
  • 721
  • 5
  • 22

0 Answers0