Question

Task 3 (20 points) I have a text file located at: /home/hb117/class/cs371/labo2/global.txt In this task, you will design a pi

cant you assume there is file like that that exists and just write a command for it.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer: tr " " "\n" < "global.txt" |sort|uniq -c

Execution screenshot:

Pneumolles-LIISPLTUN-3558: Desktops NCT mahesh@mahesh - Inspiron-3558:-/Desktops_tr \n< global.txt sort unig C 1 globaNote: It had counted one extra space in the file. command is absolutely perfect. Dont worry about that.Try running in your pc.

Add a comment
Know the answer?
Add Answer to:
cant you assume there is file like that that exists and just write a command for...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • QUESTION 1 From YOUR home directory, execute a find command string that will locate the file...

    QUESTION 1 From YOUR home directory, execute a find command string that will locate the file called resolv.conf. Include the -exec flag in the find command to cat the file to the screen. Begin your find search from the letc directory Select the correct find command string below that will accomplish this. find /etc-name 'resolv.conf -cat D find /etc-name 'resolv.conf -exec cat 0 find. -name 'resolv.conf -exec cat 0\ find /-name 'resolv.conf' -exec cat 0 QUESTION 2 What find command...

  • Question 2 0/1 point (graded) What happens when you remove a directory using the command rm...

    Question 2 0/1 point (graded) What happens when you remove a directory using the command rm -r? You cannot remove a directory using the rm command. You permanently remove the entire directory, including all files and subdirectories. You move the entire directory to a trash folder, but it can be restored later. You get a warning message asking if you want to proceed, then you delete the directory. incorrect Answer Incorrect: Try again. Unix does not warn you before permanently...

  • Q1: Design and write header file and cpp file for the following classes so that provides...

    Q1: Design and write header file and cpp file for the following classes so that provides the needs listed for each class. Use encapsulation for the purpose of hiding or protecting information and easier maintenance. Put your answer in the space provided. If you open this file with Microsoft Word, you can edit it and copy and paste your code from text editor (IDE or Sublime). You need to write a test file to test your class but adding the...

  • //I NEED THE PROGRAM IN C LANGUAGE!// QUESTION: I need you to write a program which...

    //I NEED THE PROGRAM IN C LANGUAGE!// QUESTION: I need you to write a program which manipulates text from an input file using the string library. Your program will accept command line arguments for the input and output file names as well as a list of blacklisted words. There are two major features in this programming: 1. Given an input file with text and a list of words, find and replace every use of these blacklisted words with the string...

  • Write a modularized, menu-driven program to read a file with unknown number of records.

    ==============C++ or java================Write a modularized, menu-driven program to read a file with unknown number of records.Create a class Records to store the following data: first and last name, GPA , an Id number, and an emailInput file has unknown number of records; one record per line in the following order: first and last names, GPA , an Id number, and emailAll fields in the input file are separated by a tab (‘\t’) or a blank space (up to you)No error...

  • please write it in c++ programming language this is the rat text file More what? what...

    please write it in c++ programming language this is the rat text file More what? what more additional information do you want? so i can provide it. Write a program that reads files and prepares an statistical summary for each file processed with the following information: • total number of words in the report; • number of unique words: • number of unique words of more than four letters; Input From the keyboard: 1. The name of the files containing...

  • Assignment 3: Word Frequencies Prepare a text file that contains text to analyze. It could be...

    Assignment 3: Word Frequencies Prepare a text file that contains text to analyze. It could be song lyrics to your favorite song. With your code, you’ll read from the text file and capture the data into a data structure. Using a data structure, write the code to count the appearance of each unique word in the lyrics. Print out a word frequency list. Example of the word frequency list: 100: frog 94: dog 43: cog 20: bog Advice: You can...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT