Linux scripting or bash (bourne again shell) scripting is the technique of taking one or more commands in the Linux command line and placing them into a single text file to be executed. This technique can be used to automate command line functions and can also be used to run multiple commands using just a single typed command on the Linux command line. Linux scripts are just a series of Linux commands.
Here’s an example: say I want to display a multiple line welcome message while I’m in the command line. There are two ways (that I know of) to do this:
1- use the echo command to display the each line one at a time
2 – write a script that will display the entire message all at once
After I finished writing the script in order to use it I have to make it an executable program. I do this using the chmod command.
After I set the permissions I run the script.
This is just a small taste of what scripting in Linux can do. Scripting can do mundane things like display text and also advanced OS commands like process management. Thanks for reading!