Skip to content

suggestion on running a generic shell command #54

@ORESoftware

Description

@ORESoftware

To run a generic shell command, do this:

const cp = require('child_process');

const k = 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions