1.0.4 • Published 2 years ago
shell-search-executor v1.0.4
shell-search-executor
Execute an async command and return data
https://github.com/nickpick42/shellsearch
Installation
Use the package manager npm to install shell-search-executor.
npm install shell-search-executor
Usage
const shellSearch = require("../index")
let main = async ()=>{
/*
await shellSearch(
"COMMAND TO EXECUTE",
"TEXT TO SEARCH FOR",
"RETURN LINE TEXT WAS FOUND (true or false)",
"KILL PROCESS ONCE FOUND(true or false)",
"PRINT EVERY LINE (TRUE OR FALSE)"
)*/
let response = await shellSearch("ping google.com","Reply",true,true,true)
console.log(response)
/*
PID return along with text if third parameter is set to true
*/
}
main()
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.