0% found this document useful (0 votes)
4 views12 pages

Introduction To Bash

Uploaded by

newarsahil34
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views12 pages

Introduction To Bash

Uploaded by

newarsahil34
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Introduction to Bash

Shell/Scripting

Ansh Bhawnani
What is Bash?

▰ Bash is a Unix shell and command language written by Brian Fox for the
GNU Project as a free software replacement for the Bourne shell
▰ A shell program is typically an executable binary that takes commands
that you type
▰ Typically runs in a text window where user can interpret commands to
carry out various actions.
▰ Most modern Linux and Unix distributions provide a Bash shell by default.

2
What is Bash?

3
What is Bash?

4
What is Bash?

▰ History of Bash

5
Terminal vs Shell?

▰ Terminal
▻ A piece of equipment through which you could interact with a computer
▻ Today's terminals are software representations of the old physical terminals,
often running on a GUI
▻ Mainly helps in transmission of commands

6
Terminal vs Shell?

▰ Shell
▻ Command interpreter whose main purpose is to run other programs
▻ Converts the command Into a kernel-understandable form and passes it to
the kernel.
▻ Terminal passes the typed commands to shell, which understands them and
tells the kernel what to do.

7
What is Bash

▰ Features of Bash
▻ Bash is sh-compatible. It is incorporated with the best and useful features of the Korn
and C shell like directory manipulation, job control, aliases, etc.
▻ Bash can be invoked by single-character command line options (-a, -b, -c, -i, -l, -r, etc. )
as well as by multi-character command line options also like --debugger, --help, --login,
etc.
▻ Bash Start-up files are the scripts that Bash reads and executes when it starts. Each
file has its specific use, and the collection of these files is used to help create an
environment.
▻ Bash consists of Key bindings by which one can set up customized editing key
sequences.
8
What is Bash

▰ Features of Bash
▻ Bash contains one-dimensional arrays using which you can easily reference and
manipulate the lists of data.
▻ Bash comprised of Control Structures like the select construct that specially used for
menu generation.
▻ Directory Stack in Bash specifies the history of recently-visited directories within a list.
Example: pushd builtin is used to add the directory to the stack, popd is to remove
directory from the stack and dirs builtin is to display content of the directory stack.
▻ Bash also comprised of restricted mode for the environment security. A shell gets
restricted if bash starts with name rbash, or the bash --restricted, or bash -r option
passed at invocation.
9
What is Bash

▰ Prerequisites
▻ Basics of Linux/Unix environment!
▻ Basics of terminal
▻ Basic shell commands

10
Terminal vs Shell?

11
THANKS!
Any questions?

12

You might also like