Normally, shells are interactive—meaning the shell accepts commands from you via the keyboard and executes them immediately. However, if you store a sequence of commands in a text file and instruct the shell to execute that file, it becomes a shell program or shell script. A shell script is essentially “a series of command(s) stored in a plain text file.” It’s similar to a batch file in MS-DOS but far more powerful. Shell scripts are a core part of the UNIX and Linux programming environments.
They are essential for automating tasks, managing systems efficiently, and building simple utilities.