NOS Week 17

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

1. What is Shell in UNIX?

Ans: A shell provides you with an interface to the Unix system as it is a Unix term for an
interface between a user and an operating system service. Shell is an environment in which
we can run our commands, programs, and shell scripts.

2. What is Shell scripting? Write down its 3 use?

Ans: Shell scripting is an open-source computer program designed to be run by the


Unix/Linux shell. Shell scripting is a program where you can write series of commands for the
shell to execute.

Uses

 Shell scripting is particularly used to common repetitive tasks or for system admin
task which doesn’t require full-blown programming language
 Shell scripting can be used to automate the data backup process by creating a corn
job and schedule the shell script to execute data backup commands and perform the
task in an easy way.
 Shell scripting can also be used by programmers to develop programs, scripts too
perform system level tasks, finding patterns in a file, processing the data in a file
based on the user inputs etc.

3. write down advantage and disadvantage of Bourne shell and bash shell.

Ans: Bourne Shell

Advantages

 A bourne shell can execute commands and functions that are predefined or
integrated particularly the files that search or follow a command path as
well as text file commands.
 A bourne shell interprets and execute user defined commands and provides
command-based programming abilities.
 A bourne shell enables the writing and executing of shell scripts.

Disadvantages

 It lacks features for interactive use like the ability to recall previous
commands.
 It also lacks built in arithmetic and logical expression handling.
Bash Shell

Advantages

 Writing a shell script is faster and quicker.


 Quick start
 Interactive debugging is available

Disadvantages

 Extra care is required to eliminate harmful circumstances.


 Usually, the executing speed is slow.
 There are many flaws with respect to design and implementation.

4. How do you know what shell you are using?

Ans:

5. create a script file to display your name and run the file.

You might also like