How do I make the following command work in Mathematia?
Import["!\"C:\\Program Files\\nodejs\\node.exe\" -p console.log('test')", "Text"]
I don't get any output as if the command didn't properly execute.
If I execute the following my command does execute so it is simply a problem with the execute/displays output. Also Import["!where node", "Text"] works so it is in the path.
Import["!node -h", "Text"]
EDIT: I can't reproduce this in any other application other then Mathematica so it isn't clear to me what the issue is.
nodecommand in your PATH? Did you verify that it is still in your PATH when using Mathematica (GetEnvironment)? – Szabolcs Nov 16 '15 at 12:44node test.jsworks. I added an exact path so that is no longer a question. I feel like there is enough information to reproduce the bug. – William Nov 16 '15 at 16:49ffmpeg -helpdoesn't work also I feel like there is enough information to reproduce the bug and therefore the question shouldn't have been closed as is. – William Nov 16 '15 at 16:51Import["!where node", "Text"]works whileImport["!\"C:\\Program Files\\nodejs\\node.exe\" test.js", "Text"]doesn't appear to execute at all. I also triedImport["!cmd /c \"C:\\Program Files\\nodejs\\node.exe\" -p \ console.log('test')", "Text"]withcmd /cput on the front and that also doesn't work. – William Nov 16 '15 at 17:55Import["!node.exe -e require('fs').writeSync(1,'test')", "Text"]. – WReach Nov 16 '15 at 20:18