Question: Hi!! I need help with this OS (operating systems) questions.. it needs to be done with xv6 and vagrant Part 2: Implementing a simple 'sed'
Hi!! I need help with this OS (operating systems) questions.. it needs to be done with xv6 and vagrant

Part 2: Implementing a simple 'sed' utility (20 points) uniq is a Unix utility which, when fed a text file, outputs the file with adjacent identical lines collapsed to one. If a filename is provided on the command line (i.e., uniq FILE) then uniq should open it, read, filter out, print without repeated lines in this file, and then close it. If no filename is provided, uniq should read fromstandard input. Here's an example of the basic usage of uniq: cat example.txt No. 1 No. 2 No. 2 No. 2 No. 3 No. 4 No. 5 No. 6 No. 6 No. 2 no. 2 $ uniq example.txt No. 1 No. 2 No. 3 No. 4 No. 5 No. 6 No. 2 no. 2 You should also be able to invoke it without a file, and have it read from standard input. For example, you can use a pipe to direct the output of another xv6 command into uniq: $ cat example.txt| uniq No. 1 No. 2 No. 3 No. 4 No. 5 No. 6 No. 2 No. 2 Part 2: Implementing a simple 'sed' utility (20 points) uniq is a Unix utility which, when fed a text file, outputs the file with adjacent identical lines collapsed to one. If a filename is provided on the command line (i.e., uniq FILE) then uniq should open it, read, filter out, print without repeated lines in this file, and then close it. If no filename is provided, uniq should read fromstandard input. Here's an example of the basic usage of uniq: cat example.txt No. 1 No. 2 No. 2 No. 2 No. 3 No. 4 No. 5 No. 6 No. 6 No. 2 no. 2 $ uniq example.txt No. 1 No. 2 No. 3 No. 4 No. 5 No. 6 No. 2 no. 2 You should also be able to invoke it without a file, and have it read from standard input. For example, you can use a pipe to direct the output of another xv6 command into uniq: $ cat example.txt| uniq No. 1 No. 2 No. 3 No. 4 No. 5 No. 6 No. 2 No. 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
