Lab 03 Solved

You might also like

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

Fatima jinnah women university

 Name : syeda farwa batool


 Roll no : 2022-bse-071
 Section: B
 Lab: 03
 Date: 16-oct-2023
IMPLEMENTING LINUX COMMANDS
 Display the date using command date:
 Display the Calendar Using command Cal

 Create the file named file1 and enter data by using command cat

 Using the command head and tail:

Shell Scripts and C programming


Task: 1
1. Create file name students.txt, gstudent.txt, and pgstudents. Enter students’
names in gstudent.txt and pgstudent.txt.
2. Now create directory having name OSLAB and copy all files to this directory.

3. Now append the file students.txt with first five sorted names from pstudent.txt
and last five sorted names from gstudent.txt. Then show the contents of sorted
names from file students.txt. Change the permissions of file students.txt read only
and both other files read and execute only.
Task: 2

Define variable x and y with value 20 and 30 and print it on screen, then sum,
subtract, divide these numbers and print it on the screen.

Program:
Sum:

Difference:
Division:

You might also like