Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to run bash scripts

# Give the script file correct permssions $chmod 744 <name of scipt file e.g script.sh>
$ chmod 744 script.sh 

#now the file is ready to run run it with $ ./<name of scirpt file e.g. script.sh>
$ ./script.sh
Comment

how to run shell script

chmod +x <fileName>
./fileName.  # or use ->. bash fileName
Comment

how to execute a bash script in terminal

$ chmod +x fileName
$ ./fileName
Comment

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
Comment

how to run shell script

# method 1
chmod +x <filename>
./<filename>

# method 2
sh <filename>.sh

# method 3 (Only for bash script)
bash <filename>.sh
Comment

how to run shell script

bash yourfile.sh
Comment

PREVIOUS NEXT
Code Example
Shell :: sail add php mongodb extension 
Shell :: brew upgrade casks 
Shell :: ignore line format in git 
Shell :: webpack uninstall npm 
Shell :: video player ubuntu 
Shell :: Steps to deploy your flutter project with surge 
Shell :: create branch from existing branch 
Shell :: new branch not showing in visual studio 
Shell :: change file read only permissions linux 
Shell :: Recover accidentally deleted files by git reset hard 
Shell :: git command line discard changes 
Shell :: ssh transfer file 
Shell :: silent install google chrome 
Shell :: react native ubuntu 20.04 
Shell :: change dns server ubuntu 20.04 
Shell :: rpi install chomedriver 
Shell :: git log all branches 
Shell :: curl send to ip 
Shell :: reload .bashrc 
Shell :: bash find text in specific file 
Shell :: delete git stash list 
Shell :: Kubectl get memory usage of pod 
Shell :: get ip address in powershell specifically 
Shell :: how to port-forward k8s on server 
Shell :: chown: invalid user: ‘www-data:www-data’ 
Shell :: push with token github 
Shell :: firebase install 
Shell :: git got to previous commit 
Shell :: install xfce terminal on ubuntu 
Shell :: how to increase font size in elementary os 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =