Essay on Operating System

1109 Words Dec 15th, 2011 5 Pages
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
…show more content…
identify each field by data type , c. identify each field by name , and d. store only fields relevant to the record’s purpose

16. What sed command option enables you to append new text to a file? Answer: c. a\

17. Your boss has two salary scale files, salary and salary1, and wants to compare their contents side by side to see if there are any differences in the files. Which of the following commands should he use? Answer: b. comm salary salary1

18. When you use the pr command how can you limit the output to only a screen full of text to view. (Choose all that apply.) Answer: b. Pipe the output into more. and c. Use the -l 23 option..

19. When you use the Awk printf capability, what does the dollar sign ($) represent? Answer: d. a data field

20. Your boss is trying to delete the word “difficult” as it appears in a text file containing his speech about motivation. The name of the file is motivate. When he decides to use the tr command to delete this word, it instead deletes characters throughout the text. Which of the following commands is he likely to have used? Answer: a. tr -d “difficult” < motivate

21. When you enter the command grep Linux /info/Linux_features | head, what is the maximum number of lines that will be displayed? Answer: d. 10 lines

22. List four examples of selection

Related Documents