Concept of Shell Scripting

 

A shell script is essentially a text file containing a sequence of commands that the Shell (the command-line interpreter) executes one by one. Instead of typing the same five commands every time, user put them in a script and run that single file.

How it Works
  1. The Script: A file (usually ending in .sh) containing commands and logic (if/else, loops).
  2. The Shell: A program (like Bash or Zsh) that reads the script.
  3. The Kernel: The core of the OS that carries out the hardware instructions requested by the shell.