What Exactly Are Bash Files

Asked By 60 points N/A Posted on -
qa-featured

What exactly are bash files and in which programming language they are written?

SHARE
Answered By 20 points N/A #319825

What Exactly Are Bash Files

qa-featured

There are some tasks which require the execution of several commands in a sequence. Some tasks even ask for user fed parameters to the commands. In some cases piping has to be done, i.e the output of one command has to be fed as input the consecutive command. In all these such cases, instead of doing the repetitive task of typing these commands, again and again, we write a script containing the code for user input and the sequence of the required commands.

Till now, you must have guessed that no programming language is used to write bash files. They simply consist of required commands that are written in line-break in the same order they need to be executed.

Sometimes bash files might get very simple and sometimes they even represent the executable form of a complex program like a compiler.

Bash scripts are executed in the terminal line by line like an interpreter.
Below is an execution of a simple bash script for the classic “Hello World!” program.

Related Questions