npm run shell script
// Step 1 - Permissions
$ chmod u+x ./cmd1.sh
// Step 2 - Shebang (top of file cmd1.sh)
$ #!/usr/bin/env bash
// Step 3 - Config
"scripts": {
"cmd1": "bash ./cmd1.sh"
}
// Step 4 - Run
$ yarn/npm run cmd1
npm run shell script
// Step 1 - Permissions
$ chmod u+x ./cmd1.sh
// Step 2 - Shebang (top of file cmd1.sh)
$ #!/usr/bin/env bash
// Step 3 - Config
"scripts": {
"cmd1": "bash ./cmd1.sh"
}
// Step 4 - Run
$ yarn/npm run cmd1
how to run shell script
chmod +x <fileName>
./fileName. # or use ->. bash fileName
how to run shell script
include
#!/bin/bash (1st line inside yourfile.sh)
to run
./yourfile.sh
if you do not include that line
bash yourfile.sh
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us