Answers for "npm run shell script"

6

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
Posted by: Guest on September-24-2021
13

how to run shell script

chmod +x <fileName>
./fileName.  # or use ->. bash fileName
Posted by: Guest on April-25-2020
0

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
Posted by: Guest on December-05-2020
0

how to run shell script

bash yourfile.sh
Posted by: Guest on December-05-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language