https://github.com/pulipulichen/terminal-exec
Open terminal and execute command
https://github.com/pulipulichen/terminal-exec
Last synced: 2 months ago
JSON representation
Open terminal and execute command
- Host: GitHub
- URL: https://github.com/pulipulichen/terminal-exec
- Owner: pulipulichen
- License: mit
- Created: 2019-06-01T13:31:42.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-29T09:22:31.000Z (over 5 years ago)
- Last Synced: 2025-02-25T00:26:23.554Z (3 months ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# terminal-exec
"terminal-exec" is a Node.js module used to execute command in terminal. It is very useful when your command need interactive. For example, "sudo" need user enter password.
# Requirement
"terminal-exec" had been tested in Windows 7 (64bit) and Ubuntu 16.04 LTS (64bit) with Node.js v10.15.0.
# Install
````
npm i terminal-exec
````----
# Usage
## Windows
````js
const terminalExec = require('./index.js')
terminalExec('echo "Hello world" && pause')
````Result:

## Linux
````js
const terminalExec = require('./index.js')
terminalExec('sudo echo "Hello world" & pause')
````
Result:
----
# Websites
- Project: https://github.com/pulipulichen/terminal-exec
- Issues: https://github.com/pulipulichen/terminal-exec/issues
- npm: https://www.npmjs.com/package/terminal-exec
- RunKit (test): https://npm.runkit.com/terminal-exec