Question: Linux Basic I/O. Please solve task 2 Tasks Task 1'(50 points) Implement a program to display a file's contents. It should be similar to the

Linux Basic I/O. Please solve task 2
Tasks Task 1'(50 points) Implement a program to display a file's contents. It should be similar to the UNIX cat command when given a single file. Name your command ahou. It should have the following syntax: $ /show fileName The above program displays the contents of the file named fileName Each system call must have error checking, and print an error message if it occurs. You musto), read), write) and close) system calls. 10 points each. Task 2 (50 points) Modify the above program to iplement a program called body simlar to UNIX commads head or tail. It should priut from the mth line to the nth line of the given file. It should have the followig syutax $body m fileName The above program displays the contents of the fileed fileName, from line n to line u. Each system call must have error checking, and print an eror message if it occurs. You must), read), write), and close ) syste calls. 10 points each
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
