Read an ascii file and perform operations chosen by user on it

CLOSED
Bids
18
Avg Bid (USD)
$34
Project Budget (USD)
$30 - $5000

Project Description:
Objective: Write a program capable of performing some elementary text analysis according to the following specifications. DESCRIPTION This program reads an ASCII text from file textin, performs one analysis operation as specified by one of the options s, f, r, c then writes the result onto file textout.

## Deliverables

This program reads an ASCII text from file textin, performs one analysis operation as specified by one of the options s, f, r, c then writes the result onto file textout. OPTIONS -s Sort the input text words lexicographically in ascending order. This program defines a “word?? as any sequence of characters preceded or followed by at least one space, tab or newline characters. The output consists of the number of different input words on one line, followed by a sorted list of all different input words, with one word per line. -f Compute the number of occurrences of all input text words. The output consists of the input words and number of occurrences on one line. -r This option may be specified in conjunction with the -s option (it is silently ignored in all other cases), and its effect is to reverse the sorting order in the output. -c This option may be specified in conjunction with the -f option (it is silently ignored in all other cases), and its effect is to make the program compute the frequency of occurrence of characters instead of words. All ASCII characters must appear in the list, with a frequency of 0 for those absent in the input text. DIAGNOSTICS Upon successful completion the program exits with 0-exit status. Otherwise an appropriate diagnostic message is output on standard error, and an exit status of 1 is reported. In particular, an “Usage'' message, explaining the command synopsis and giving a brief explanation of each option, must be reported on standard error whenever an illegal option is specified on the command line. - You may use input and output redirection to read and write the text files. Alternatively, you may use file handling functions of C. 1. Also In this assignment, you have to use command line arguments to specify the appropriate switch (option) while running your program. 2. Basically, this program should perform 4 tasks as defined with each switch. You may use the switch as command line as you think appropriate.


## Platform

C programming in Unix

Skills required:
C Programming, C# Programming, Engineering, Linux, MySQL, PHP, Software Architecture, Software Testing, UNIX
About the employer:
Verified
Public Clarification Board
Bids are hidden by the project creator. Log in as the employer to view bids or to bid on this project.
You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.