Answered step by step
Verified Expert Solution
Link Copied!

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 image text in transcribed image text in transcribed image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial And Temporal Databases 10th International Symposium Sstd 2007 Boston Ma Usa July 2007 Proceedings Lncs 4605

Authors: Dimitris Papadias ,Donghui Zhang ,George Kollios

2007th Edition

3540735399, 978-3540735397

More Books

Students also viewed these Databases questions

Question

Is there anything about this experiment you find disturbing?

Answered: 1 week ago

Question

Define procedural justice. How does that relate to unions?

Answered: 1 week ago