To run a generic shell command, do this:
constcp=require('child_process');constk=cp.spawn('bash');k.stdin.write('\n');k.stdin.write('any command you would ever want in any format');k.stdin.end();the above will change your life when writing library code where the user gives you an arbitrary command to run.
To run a generic shell command, do this:
the above will change your life when writing library code where the user gives you an arbitrary command to run.