There are several ways to execute bash scripts.
- Run Bash Script using sh
sh <script name> <arguments>
Example:
sh helloworld.sh
- Run Bash Script using bash
bash <script name> <arguments>
Example:
bash helloworld.sh
- Run Bash Script using source
source <path>*/<file name> <arguments>
Path:
./file.sh - run in local directory
/home/user/Documents/file.sh - run absolute path directory
Example:
source script.sh - local path
. script.sh - local path
/home/kb/script.sh -absolute path
If necesarry right is needded use:
chmod +x nazwa_pliku.sh
To be continue....
PS.
bash - Bourne Again Shell
To increase my user exprience in CLI, I choose to install ZSH and Starshipp.
In the future my goal is to use Vim daily.

No comments:
Post a Comment