代写一个类似Join命令的程序,需要的功能通过man查看。
Requirement
All labs and assignments for this course will be done on A Unix environment.
You will need to log in and access your account there. If you do not have an
account in the Lab, you must go see ITSS. If you do not have an account,
please send me an email with your full name and student number so that I can
create an account for you (or have one created). You may use any software you
like to access the OS machine (E.g., putty, x2go, cygwin).
To continue developing your skills in C programming you are to write a program
called glue that does exactly the same thing as the Unix join command. The
utility join combines the lines of two files based on the presence of a common
word. For details on join you can use the man command:
tami@os:~$ man join
You do not need to implement any of the command line options, but you should
perform suitable error checking (e.g., 3 command line arguments, both files
exist and are readable). For additional explanation and some examples of
operation, please see:
https://en.wikipedia.org/wiki/Join_(Unix)
However, because there is a working join command on OS, you can learn how it
works by creating data files and then trying to join them. For testing
purposes, you can verify your program’s correctness by using both glue and
join and then checking that they produce identical results. All source code
must be written from scratch. You are not permitted to download any code and
use it as a part of your solution, though you may reuse code you have written
for lab 0.
To submit your work you do not have to do anything. The marker will have
access to your directories on OS and will simply enter them, check the
timestamps, and mark work that is timestamped BEFORE the submission deadline.
Your assignment must be in your home directory in a sub-directory named lab1
(all lower case). The OS machine is explicitly for performing assignments in
the operating systems course. You have no privacy on this machine as the
marker, administrator, and instructor can enter your directories, view your
running programs, and examine your files.
Space on the machine is minimal, so do not store any files that are not
directly related to your operating systems assignments.
Marking will ONLY be performed on code that executes. Your code will be marked
with regard to format, clarity, readability, and efficiency. Please prioritise
simplicity ahead of efficiency. That is, I want to see clean, easy-to-read
code, more than efficient but complicated and confusing code. However, do not
sacrifice efficiency when a clear, easy-to-understand improvement is possible.