0% found this document useful (0 votes)
59 views

COMP83 Lab 2

The document provides instructions for a Linux lab assignment asking the student to: 1) Create a directory called myLab-XXX in the /root directory where XXX is the last 3 digits of their student ID. 2) Create 3 files (fileA.txt, fileB.txt, fileC.txt) in the myLab directory using vi editor and adding test data. 3) Perform various commands on the files like displaying contents, sorting data, joining files etc. 4) The document also provides a marking rubric to evaluate the student's submission.

Uploaded by

dilpreet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

COMP83 Lab 2

The document provides instructions for a Linux lab assignment asking the student to: 1) Create a directory called myLab-XXX in the /root directory where XXX is the last 3 digits of their student ID. 2) Create 3 files (fileA.txt, fileB.txt, fileC.txt) in the myLab directory using vi editor and adding test data. 3) Perform various commands on the files like displaying contents, sorting data, joining files etc. 4) The document also provides a marking rubric to evaluate the student's submission.

Uploaded by

dilpreet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

COMP 83

LINUX 1
Lab 2

Student Name: Dilpreet Singh

Student ID: 4326286

Date: 16/06/2021
Perform the following task using the Linux command-line tool:

a) In the /root directory, create a directory myLab-XXX, where XXX is the


last 3 digits of your student’s ID.

b) In myLab directory create the following files using the vi editor:

fileA.txt fileB.txt fileC.txt

Joe Harvey 76 Edward Jones 90 Joe Mississauga


Bob Miller 45 Tom Arnold 25 Bob Ajax
Sally Shield 81 Mark Hill 61 Sally Brampton
Courtney Adam 56 Sharon Price 44 Courtney
Scarborough
c) Display the content of fileA.txt, fileB.txt, and fileC.txt
d) Display the top 2 rows of fileA.txt
e) Display the bottom 3 lines of fileA.txt

f) Combine fileA.txt and fileB.txt (one on top of the other)


g) Merge fileA.txt with fileB.txt (side by side)

h) Join fileA.txt and fileB.txt


i) Join fileA.txt and fileC.txt

j) Sort the first column of fileA.txt in alphabetical order


k) Sort the first column of fileA.txt in reverse alphabetical order

l) Sort the second column of fileA.txt in alphabetical order


m) Sort the second column of fileA.txt in reverse alphabetical order

n) Sort the third column of fileA.txt in ascending order (lowest number first)
o) Sort the third column of fileA.txt in descending order (highest number
first)

p) Add numbered lines to fileB.txt


q) Perform a word count on fileB.txt

r) Change Ajax to Hamilton in fileC.txt


Marking Rubrics
No submission 0/10
Complete or incomplete submission after 3/10
cut off time
Complete less than 80% of task before cut 5/10
off time
Complete less than 80% of task within time 6/10
limit
Complete at least 80% of task before cut off 7/10
time
Complete at least 80% of tasks within time 8/10
limit
Complete all tasks before the cut off limit 9/10
Complete all tasks within time limit 10/10

Mark:__________
END

You might also like