Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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. 2Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started