Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Following the answer given at unix.stackexchange.com/questions/58011/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?

share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.