javascript run command
const { execSync } = require('child_process');
const output = execSync('ls', { encoding: 'utf-8' });
console.log('The output is:');
console.log(output);
javascript run command
const { execSync } = require('child_process');
const output = execSync('ls', { encoding: 'utf-8' });
console.log('The output is:');
console.log(output);
run command line using javascript
const { exec } = require("child_process");
exec("ls -la", (error, stdout, stderr) => {
if (error) {
console.log(`error: ${error.message}`);
return;
}
if (stderr) {
console.log(`stderr: ${stderr}`);
return;
}
console.log(`stdout: ${stdout}`);
});
how to send a command in js
<form action="">
<select name="channel">
<option value="#channel1">channel1</option>
<option value="#channel2">channel2</option>
</select>
</form>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us