Rahul's Blog

What is bash? What is Shell Scripting

July 21, 2020

Bash is a shell program designed to listen to my commands and do what I tell it to.

Bash is a simple tool in a vast toolbox of programs that lets me interact with my system using a text-based interface.

The bash shell is a binary program that runs either interactively or non-interactively, usually in a text-based interface provided by a terminal emulator program.

A bash command is the smallest unit of code that bash can independently execute. While executing a command, you cannot interact with the bash shell. As soon as bash is done executing a command, it returns to you for the next command to execute.

Bash gets commands by reading lines. As soon as it’s read enough lines to compose a complete command, bash begins running that command. Usually, commands are just a single line long. An interactive bash session reads lines from you at the prompt. Non-interactive bash processes read their commands from a file or stream. Files with a hashbang as their first line (and the executable permission) can be started by your system’s kernel like any other program.


Written by Rahul Jain         
I write code like I make sandwich