JS | Executing Shell Commands
For simple shell commands on Node, say ls:
const execSync = require('child_process').execSync;commandStr = 'whatever_you_want'const output = execSync(commandStr, { encoding: 'utf-8' });
Resources:
For simple shell commands on Node, say ls:
const execSync = require('child_process').execSync;commandStr = 'whatever_you_want'const output = execSync(commandStr, { encoding: 'utf-8' });
Resources: