Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

SW Lab Manual

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

SOFTWARE WORKSHOP

Laboratory Manual

For

SOFTWARE WORKSHOP

B.Tech. (IT)
SEM I

July 2021
Faculty of Technology
Dharmsinh Desai University
Nadiad.
www.ddu.ac.in
SOFTWARE WORKSHOP

Table of Contents

EXPERIMENT-1

Overview of the UNIX Operating System and Linux Architecture........................................07

EXPERIMENT-2

Installation of open source/freeware software using package manager for programming


/simulation ………...................................................................................................................08

EXPERIMENT-3

Command Usage and General-Purpose Utilities.....................................................................09

EXPERIMENT-4

File system and Handling ordinary files..................................................................................10

EXPERIMENT-5

Basic File Attributes and more File Attributes........................................................................11

EXPERIMENT-6

The vi Editor.…….…………...…….......................................................................................12

EXPERIMENT-7

Basics of Shell script……………............................................................................................13

EXPERIMENT-8

Shell script: while Loop…………….......................................................................................14

EXPERIMENT-9

Shell script: for Loop and Branching.......................................................................................15

EXPERIMENT-10

Simple filters and Advance filters …..…………….................................................................16

EXPERIMENT-11

Study of LATEX for scientific documents and report writing…............................................17

Department of Information Technology, Faculty of Technology, D. D. University, Nadiad.


1
SOFTWARE WORKSHOP

Sample Experiment
1 AIM: (A) Explain the following commands:
- clear
- cal
- who
- date
- mkdir
- rm

2 TOOLS/APPARATUS: Linux operating system.

3 STANDARD PROCEDURES:

3.1 Analyzing the Problem:

• Start the Linux and enter the user name and password. After that open the terminal.
At the terminal try the different commands and see the output.

3.2 Designing the Solution:

• At the terminal first perform the command cal without and with the different options
available for it.
• Like $ cal and then enter. The calendar will be displayed at the terminal.
• $ cal –m and then enter. In the calendar Monday will be displayed as the first day of
the week.
• Same way perform the other commands like clear, who, date, mkdir, rm.

3.3 Implementing the Solution:

3.3.1 Writing

Source Code:
1) CAL:
At the terminal write the following:
[user1@com]$ cal
[user1@com]$ cal 2015
[user1@com]$ cal 03 2015

2) CLEAR:
At the terminal write the following:
[user1@com]$ clear

3) WHO:
At the terminal write the following:
[user1@com]$ who

Department of Information Technology, Faculty of Technology, D. D. University, Nadiad.


2
SOFTWARE WORKSHOP

4) DATE:

At the terminal write the following:


[user1@com]$ date

[user1@com]$ date +%h

[user1@com]$ date +”%h %m”

[user1@com]$ date +%D

[user1@com]$ date +%T

5) MKDIR and CD:

At the terminal write the following:


[user1@com]$ ls

[user1@com]$ mkdir progs

[user1@com]$ ls

[user1@com]$ cd progs

[user1@com]$ mkdir kite

[user1@com]$ ls

3.3.2 Compilation /Running and Debugging the Solution:

• The code written above will display the following output. For the first command CAL
the output is like this:

cal command

Department of Information Technology, Faculty of Technology, D. D. University, Nadiad.


3
SOFTWARE WORKSHOP

clear command

Department of Information Technology, Faculty of Technology, D. D. University, Nadiad.


4
SOFTWARE WORKSHOP

After Clear

WHO Command

DATE Command

MKDIR and CD Command

Department of Information Technology, Faculty of Technology, D. D. University, Nadiad.


5
SOFTWARE WORKSHOP

3.4 Testing the Solution:

• All the commands will display the output based on it and the options given to that
command.
• If we are giving a command and the option to that command then that option must
be of that command only otherwise will display the error.

4. Conclusions:

• Using this we can run different command and see the output.

Department of Information Technology, Faculty of Technology, D. D. University, Nadiad.


6
SOFTWARE WORKSHOP

EXPERIMENT-1

Aim: Overview of the UNIX Operating System and Linux Architecture.


Tools: Linux operating system, terminal.

Procedure:

• Explain the history of the UNIX operating system. As well as what is Linux.
• Explain Linux Architecture.

Department of Information Technology, Faculty of Technology, D. D. University, Nadiad.


7
SOFTWARE WORKSHOP

EXPERIMENT-2

Aim: Installation of open source/freeware software using package manager for


programming.

Tools: Linux operating system, terminal.

Procedure:

• Demonstrate installation of minimum two software using package manager.

Department of Information Technology, Faculty of Technology, D. D. University, Nadiad.


8
SOFTWARE WORKSHOP

EXPERIMENT-3

Aim: Command Usage and General-Purpose Utilities.

• Explain the following commands: cal, date, cat, ls, man, clear, tput, exit, pwd, echo,
printf, script, wc, bc, who,tty,stty.

Tools: Linux operating system, terminal.

Procedure:

• Explain all the commands. Also run all these commands with options available for it.
And see the output.
• Write the description about all these commands.

Department of Information Technology, Faculty of Technology, D. D. University, Nadiad.


9
SOFTWARE WORKSHOP

EXPERIMENT-4

Aim: File system and Handling ordinary files.

• Explain the following commands: mkdir, rmdir,cd, rm, cp,mv, cmp, comm,more,less

Tools: Linux operating system, terminal.

Procedure:

• Explain all the commands. Also run all these commands with options available for it.
And see the output.
• Write the description about all these commands.

Department of Information Technology, Faculty of Technology, D. D. University, Nadiad.


10
SOFTWARE WORKSHOP

EXPERIMENT-5

Aim: Basic File Attributes and more File Attributes.

• Explain the following commands: chmod, chown, chgrp.

• Solve the following problems with the use of find command.

a. Find all files with extension .html or .sh


b. Find all file whose name is not ending with .c
c. Find all files having inode number 124536
d. Remove all abc.txt files under the home directory.
e. Find all directories with permission 777 under root directory.
f. Find all files modified in less than 30 minutes under present directory.
g. Find all files modified after file abc.txt.

Tools: Linux operating system, terminal.

Procedure:

• Explain the permission for the file and also the commands available for it.
Run all these commands with options available for it. And see the output.
• Write the description about all these commands.

Department of Information Technology, Faculty of Technology, D. D. University, Nadiad.


11
SOFTWARE WORKSHOP

EXPERIMENT-6

Aim: The vi Editor.

• Explain About vi Editor.

Tools: Linux operating system, terminal.

Procedure:

• Explain all the commands. Also run all these commands with options available for it.
And see the output.
• Write the description about all these commands.

Department of Information Technology, Faculty of Technology, D. D. University, Nadiad.


12
SOFTWARE WORKSHOP

EXPERIMENT-7

Aim: Basics of Shell script.

• Design a shell script to find average of three numbers entered by user.


• Find which number is greater amongst the three entered numbers.
• Design a shell script to display only the lines containing the word "DDU" in a given
file.

Tools: Linux operating system, terminal.

Procedure:

• Make a shell script which finds average of all three numbers enter by user.
• Make a shell script which finds the greatest number among the three numbered
entered by the user.
• Make a file in which some contents are there. Now make a script which finds that the
word “DDU” and display lines containing word DDU.

Department of Information Technology, Faculty of Technology, D. D. University, Nadiad.


13
SOFTWARE WORKSHOP

EXPERIMENT-8

Aim: Shell script: while Loop.

• Design a shell script which would display the summation of the digits of the given
number.
• Design a shell script to reverse a given number.
• Design a shell script to print the sum, sum of squares and sum of cubes of first n
numbers where n is taken from the user.

Tools: Linux operating system, terminal.

Procedure:

• Make script in which user has to enter one number. Now design a script in which you
have to add the digits of the number.
• Make script in which number entered by the user will reverse.
• Design a calculator in which the basic operation like addition, multiplication, division
and subtraction is done. Here the value for each and every operation should be
entered by the user.

Department of Information Technology, Faculty of Technology, D. D. University, Nadiad.


14
SOFTWARE WORKSHOP

EXPERIMENT-9

Aim: Shell script: for Loop and Branching

• Design a shell script for a simple calculator. (use case)


• Design a shell script to create looping patterns.

* 1
** 22
*** 333
**** 4444
***** 55555

Tools: Linux operating system, terminal.

Procedure:

• Using loops generate all the patterns.

Department of Information Technology, Faculty of Technology, D. D. University, Nadiad.


15
SOFTWARE WORKSHOP

EXPERIMENT-10

Aim: Simple filters and Advance filters.

• Explain the following commands: head, tail, cut, paste, sort, uniq, grep, sed, awk.

Tools: Linux operating system, terminal.

Procedure:

• Explain all the commands. Also run all these commands with options available for it.
And see the output.
• Write the description about all these commands.

Department of Information Technology, Faculty of Technology, D. D. University, Nadiad.


16
SOFTWARE WORKSHOP

EXPERIMENT-11

Aim: Study of LATEX for scientific documents and report writing.

Tools: Latex

Procedure:

• Prepare document using Latex.

Department of Information Technology, Faculty of Technology, D. D. University, Nadiad.


17

You might also like