What is a shell script?

Answer

A shell script is a text file containing a sequence of shell commands that are executed in order by a shell interpreter (such as Bash). Scripts automate repetitive tasks, system administration, deployments, backups, and more. A script starts with a shebang line (e.g., #!/bin/bash) that tells the OS which interpreter to use. Scripts support variables, conditionals, loops, functions, and command substitution — making them a full programming environment. They are widely used for DevOps automation, cron jobs, and system configuration management.