Question: Please, do this in Linux using c programming, Both task are linked together so have to match somewhat. Thanks Task 1 Implement a program to
Please, do this in Linux using c programming, Both task are linked together so have to match somewhat. Thanks

Task 1 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 show. It should have the following syntax: S/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 must use open, read, write and close system calls Task 2- modify task2 Modify the above program to implement a program called body similar to UNIX commands head or tail. It should print from the mh line to the nh line of the given file. It should have the following syntax: s /body fileName The above program displays the contents of the file named fileName, from line m to line n Each system call must have error checking, and print an error message if it occurs You must use open , read), write), and close system calls
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
