Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to run shell script in linux

# 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

ubuntu run a shell script

$ ./script_name.sh

// if it need sudo permission the type:
$ sudo ./script_name.sh
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

run shell script linux

$ 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

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

# method 2
sh <filename>.sh

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

linux execute sh

include 
#!/bin/bash

then in terminal
chmod +x <filename>
./<filename>
Comment

how to run shell script

bash yourfile.sh
Comment

PREVIOUS NEXT
Code Example
Shell :: windows proxy for local system 
Shell :: unmount nfs 
Shell :: ubuntu kill port 
Shell :: install screenshot linux 
Shell :: Set wp-config.php using wp-cli 
Shell :: pm2 start yarn 
Shell :: kill tensorboard process 
Shell :: kill all mongodb processes 
Shell :: ffmpeg convert mkv to mp4 
Shell :: how to debug wirelessly android 
Shell :: httpd.conf location centos 
Shell :: replace substring in shell 
Shell :: deactivate laptop keyboard ubuntu 
Shell :: pipe shell output to vim 
Shell :: start chrome linux 
Shell :: ffmpeg from frames to video 
Shell :: grep multiple 
Shell :: nvm zsh command not found 
Shell :: redis delete keys that match pattern 
Shell :: install cmake debian 
Shell :: what is the difference between powershell and command prompt 
Shell :: print env variables 
Shell :: remove local images 
Shell :: como instalar paquetes tar.gz en ubuntu 
Shell :: ubuntu taskbar not showing incons for current applications 
Shell :: installing git in ec2 
Shell :: auto generate requirements.txt python 
Shell :: how to download grub with pop os 
Shell :: ubuntu install jellyfin 
Shell :: bash check if file is empty 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =