Skip to content
pasha3 edited this page Nov 13, 2019 · 33 revisions

Useful Guide for Bash Scripting

Creating bash file:

touch bashfile.sh

To execute bash file run it like this:

./bashfile.sh

Note: Since ".sh" files are sensitive that's why their permission is off by default.

To give it permission write:

chmod +x bashfile.sh

edit your "bashfile.sh" and write: echo "Hello World" then execute it...

Linux Terminal Commands run on bash,Try writing "ls" in bashfile.sh and execute it:

If you want to rewrite last command type !!

Comment's in Bash

To check current directory type pwd

Reading file

First create a text file

Clone this wiki locally