On Dec 10, 2016, at 11:36 AM, emerb nura wrote:
> Im new to Node.js,I want to execute shell commands using Node.js.When I tried
> a simple command(ipconfig), I got the outout.But I want to execute CLI
> commands, So in order to do so I need to execute the commands in a particular
> path .How to set path from script?. I used child_process.exec() for executing
> shell commands.Kindly share the code to execute the commands in a particular
> path. Thanks
Use the absolute path to the program, for example /usr/bin/someprogram, or else
set the PATH environment variable to the directory in which the program can be
found, for example /usr/bin. (If needed, PATH can contain multiple directories,
separated by colon (":") characters.)
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/EE510C6E-DECA-4D4E-911A-538AFB052DD2%40ryandesign.com.
For more options, visit https://groups.google.com/d/optout.