0% found this document useful (1 vote)
194 views

OSY Microproject

This document outlines a micro-project on shell scripting in Linux/Unix. It includes an introduction to shell scripting, what a shell is, types of shells, steps to write shell scripts, adding comments, and shell variables. It also lists the names and roll numbers of students, resources needed, and the aim of the micro-project which is to increase knowledge of and experience with shell scripting in Linux/Unix through teamwork and communication.

Uploaded by

FOReX GAMING
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
194 views

OSY Microproject

This document outlines a micro-project on shell scripting in Linux/Unix. It includes an introduction to shell scripting, what a shell is, types of shells, steps to write shell scripts, adding comments, and shell variables. It also lists the names and roll numbers of students, resources needed, and the aim of the micro-project which is to increase knowledge of and experience with shell scripting in Linux/Unix through teamwork and communication.

Uploaded by

FOReX GAMING
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

INFORMATION TECHNOLOGY

Topic For Micro-Project :- Shell Script in Linux/Unix"

ROLL NO NAME
3523 Piyush utekar
3505 Aakash Deshmukh
3515 Ayush Maurya
3516 Suraj mishra

Guided By :- Mrs. Ashwini Parkar.


Topic For Micro-Project :- Shell Script in Linux/Unix"

BRIEF INTRODUCTION :-
Shell Scripting is an open-source computer program run by the Unix/Linux shell. Shell
Scripting is a program to write a series of commands for the shell to run. It can combine
lengthy and repetitive sequences of commands into a single and simple script that can be
kept and run anytime which, decreases programming efforts.

This Shell Scripting tutorial aids in learning a basic understanding of the Linux/Unix shell
scripting program to develop concepts of Shell Scripting. This Shell Script tutorial is
designed for newbies and professionals who want to learn What is Shell Scripting? How
shell scripting works, types of shell, and more.

WHAT IS SHELL?
Shell is a UNIX term for an interface between a user and an operating system service. Shell
delivers users with an interface and receives human-readable commands into the system
and performs those commands which can run automatically and give the program’s output
in a shell script.

An Operating is created of many components, but its two prime components are –

• Kernel
• Shell

A Kernel is at the heart of a computer. It completes the communication between the


hardware and software possible. While the Kernel is the innermost part of an
operating system, a shell is the outermost one.
TYPES OF SHELL
1. The Bourne Shell: The prompt for this shell is $ and its derivatives are listed
below:

• POSIX shell also is known as sh


• Korn Shell also known as sh
• Bourne Again SHell also known as bash (most popular)

2. The C shell: The prompt for this shell is %, and its subcategories are:
• C shell also is known as csh
• Tops C shell also is known as tcsh

STEPS TO WRITE SHELL SCRIPT IN


LINUX/UNIX
Shell Scripts are written utilizing text editors. On your Linux system, open a text editor
program, open a new file to begin typing a shell script or shell programming, then give the
shell permission to complete your shell script and put your script at the location from
where the shell can locate it.

Let us understand the steps in making a Shell Script:

1. Create a file utilizing a vi editor(or any other editor). Name script file with
extension .sh
2. Start the script with #! /bin/sh
3. Write some code.
4. Save the script file as filename.sh
5. For running the script type bash filename.sh

Let’s create a small script: –

Command ‘ls’ is run when we complete the scrip sample.sh file.


ADDING SHELL COMMENTS:-
Commenting is important in any program. In Shell programming, the syntax to add a
comment is

WHAT ARE SHELL VARIABLES?


Variables store data in the form of characters and numbers. Likewise, Shell variables are
utilized to store information and they can be by the shell only.

For example, the following creates a shell variable and then prints it :-

As you see, the program determined the value of the variable ‘name’ as
Joy and ‘remark’ as excellent. This is a simple script. You can create
advanced scripts which contain conditional statements, loops, and
functions. Shell scripting will make your life easy and Linux
administration a breeze.
AIM OF THE MICRO-PROJECT :-
An Operating System is basically a system program that controls the
execution of application programs and acts as an interface between
applications and the computer hardware. It manages the computer system
resources to be used in an efficient manner. This course enables one to learn
the internal functioning of operating systems and will help in identifying
appropriate Operating Systems for given applications/tasks. This course is
also a prerequisite for the group of courses included in the 'Cloud
Infrastructure Maintenance' Elective group.
SR NO NAME OF THE QUANTITY
RESOURCES SPECIFICATION

1 LAPTOP INTERNET 1
OSY Operating
2 TEXTBOOK/MANUAL Systems 1

3 MS WORD 1
Topic For Micro-Project :-. Shell Script in Linux/Unix"

BRIEF INTRODUCTION :-
Shell Scripting is an open-source computer program run by the Unix/Linux shell. Shell Scripting
is a program to write a series of commands for the shell to run. It can combine lengthy and
repetitive sequences of commands into a single and simple script that can be kept and run anytime
which, decreases programming efforts.

This Shell Scripting tutorial aids in learning a basic understanding of the Linux/Unix shell scripting
program to develop concepts of Shell Scripting. This Shell Script tutorial is designed for newbies
and professionals who want to learn What is Shell Scripting? How shell scripting works, types of
shell, and more.

AIM OF THE MICRO-PROJECT :-


An Operating System is basically a system program that controls the execution of
application programs and acts as an interface between applications and the computer
hardware. It manages the computer system resources to be used in an efficient manner.
This course enables one to learn the internal functioning of operating systems and will
help in identifying appropriate Operating Systems for given applications/tasks. This
course is also a prerequisite for the group of courses included in the 'Cloud Infrastructure
Maintenance' Elective group.
1. Increase knowledge about shell scripting in Linux/Unix.
2. Experience teamwork
3. Increase communication skill
4. Know about shell scripting in Linux/Unix.

You might also like