Header Ads

Introduction To shell programming

                  Introduction To shell programming 

An Operating is made of many components,but its two prime components.

1.kernel
2.shell

shell: Interprets user command either from direction user input or read from file called shell scripts.
shell scripts are interpreted not complied.

There are two type of shell. Bourne shell and Bash Shell .

Bourne Shell: Original shell of all UNIX based operating system. This is the first shell invented by Steve Bourne.
 
Bash Shell:Bourne Again SHell also known as bash (most popular) we will be using this shell

Reinvented
Improved and standard shell
Most Unix operating System uses Bash.

Basic About shell 

To see supported shells run this command cat /etc/shells
To see where the bash is located which bash

Run "Hello world" [your first shell program]

*At first create a file : touch fileName.sh
.sh is used for shell script it not imperative 

*Open the file with any text editor:  nano filename.sh [nano is a text editor name]

 *Print Hello World : echo "Hello World".
you can mentioned location  #! /bin/bash

Give the file Permission :chmod u+x filename.sh

To run a program : ./filename.sh



shell program output
shell command

 

No comments

Powered by Blogger.