Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please Use C programming language And getopt() has to be used Thanks It should break the line as u input -w and a num and

Please Use C programming language
And getopt() has to be used
Thanks
It should break the line as u input "-w and a num" and it should break if there is a space and the total characters> 'num' and it also doesn't break after any punctuation if there is a punctuation. it should work as follow: e.g.INPUT: HELLO, HOW ARE U TODAY -w5 -p output: HELLO , HOW ARE U TODAY
image text in transcribed
2. Word-oriented version of fold Write a standard unix tool to break long lines in a text file, except that your tool will break long lines ata space if possible rather than in the middle of a word This tool takes file names on the command line or it reads the standard input, in the standard unix tool manner, and outputs on the standard output The default width is 80" There is a command-line option which specifies the width (-w plus a numeric argument), and another command-line option -p which says to be wlling to break the line after any punctuation mark even in the absence of spaces Examples For the input text I like the unix programming environment,really I do the command "foldw -w17" would produce the four lines I like the unix programming environment, reall Y I do and the command "foldw-w17-p" would produce the four lines I like the unix programming environment, really I do The -w and -p flags must work in either order and in any standard combination. Use getopt the command-line options correctly to process

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_2

Step: 3

blur-text-image_3

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

love of humour, often as a device to lighten the occasion;

Answered: 1 week ago

Question

orderliness, patience and seeing a task through;

Answered: 1 week ago

Question

well defined status and roles (class distinctions);

Answered: 1 week ago