/alx-system_engineering-devops-1

This repo contain task on Shell basics.

Primary LanguageShell

ALX-system_engineering-devops

alx

This repo contain tasks on Shell basics and scripting.

What is shell Scripting?

A shell script is small computer program that is designed to be run or executed by the Unix shell, which is a command-line interpreter. A shell script is basically a set of commands that the shell in a Unix-based operating system follows. Like actual programs, the commands in the shell script can contain parameters and subcommands that tell the shell what to do. The shell script is usually contained in a simple text file.

shell

A shell script is program composed of a series of operating system commands that are executed by the command-line interpreter or the shell in sequence. It is called a shell script because the individual commands are combined to form a "script" that the shell follows and executes, very much like how an actor/actress follows the script written for him/her. A shell script is useful for repetitive tasks that would become time consuming if manually typed in then executed one at a time. For example, programmers and developers use shell scripts to automate their code compile process so that instead of typing in a series of long commands, they just execute the shell script. This is especially helpful for them because they often compile and test code, sometimes multiple times, in one single minute.

shell script

Scripts start with a bash bang.

Scripts are also identified with a shebang. Shebang is a combination of bash # and bang !  followed the the bash shell path. This is the first line of the script. Shebang tells the shell to execute it via bash shell. Shebang is simply an absolute path to the bash interpreter. Below is an example of the shebang statement.

#! /bin/bash

Connect with me:

techbydami agboola-olawale-damilola-7b2132246 19747131 techbydami @techbydami techbydami 5007