Skip to content

suggestion on running a generic shell command #54

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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