Guide to UNIX Using Linux Fourth Edition
Chapter 5 Solutions
Answers to the Chapter 5 Review Questions
1. You have just finished a 25-page paper that you have written using Emacs. The file containing the paper is called /assignments/data_sources. After your instructor has briefly looked at the paper, she recommends that you change all instances of the reference “data is” to “data are” before you submit it. Which of the following commands can you use to locate these references in the file for a quick assessment of how much you have to change? Answer: c. grep “data is” /assignments/data_sources
2. You are interested in determining the number of words in your /assignments/data_sources file mentioned in Question 1. Which of the following commands should you use? Answer: a. wc -w /assignments/data_sources
3. Which of the following are examples of manipulation and transformation commands? (Choose all that apply.)
Answer: a. sed, b. pr,
4. Which of the following is true of the pipe operator? (Choose all that apply.) Answer: d. It redirects the output of one command to the input of another command.
5. Because the data was formatted the same in two inventory files, you decided to combine their contents into one file. Now you want to determine if there are duplicate entries on consecutive lines in the new file. Which of the following commands enables you to find the duplicate entries? Answer: c. uniq
6. Your friend is using the command comm entryfile, but is getting an error message. What is the problem? (Choose all that apply.)
Answer: d. It is necessary to specify two files when you use the comm command.
7. Your boss is trying to import the customers file into her spreadsheet program, but the data goes into the spreadsheet incorrectly. This is because the fields are separated by dashes (-) and the spreadsheet program requires the fields to be separated by colons (:)....
Please join StudyMode to read the full document