1.0.4 • Published 2 years ago

@ravindu01manoj/bash-js v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

SHELL SCRIPT AND COMMANDS RUN WITH NODEJS



Installation

npm i @ravindu01manoj/bash-js
## or
yarn add @ravindu01manoj/bash-js

Example

const bash = require("@ravindu01manoj/bash-js")

async function run() {

//for single command
const out = await bash.command("ls")
console.log(out)

//for script
const script = `
mkdir a
cd a
touch hello.txt
ls
cd ..
`
const output = await bash.script(script)
console.log(output)
}
run()