what is bash script

Answer

Metaphorically speaking bash script is like 'to do list'. After you read the first entry you start realizing it. After you finished first entry, you continue with second entry and so on.

A bash script is a text file which contains a mixture commands.

Bash script can contains also functions, loops, conditional constructs. Scripts are commonly used for administration task like change file permission, creating disk backups. Using bash scripts is often faster than using graphical user interface.

It's important to mention that there is no difference between putting series of 10 commands into script file and executing that script or you entering commands one by one to command line interface. In both situations result will be exactly the same thing.

After you create your script it is good practice to add extension '.sh' to filename, for example 'myFirstScript.sh'.

Was this information helpful to you? You have the power to keep it alive.
Each donated € will be spent on running and expanding this page about UNIX Shell.