The first command causes echo to display the characters c, a, and t on the screen. The second command uses cat to copy the contents of a file named echo to the screen. If there is no file named echo, cat displays an error message.

What will be an ideal response?


You can either decompress the file using gunzip, giving the same commands
as in exercise 5 once the file is decompressed, or use zcat and a pipeline to
display the results without creating an intermediate file:
$ zcat phone.gz | grep "Ace Electronics"
$ zcat phone.gz | sort
$ zcat phone.gz | uniq
$ zcat phone.gz | sort -u
Which technique you use makes a significant difference only if phone.gz is
large, in which case it becomes an issue of what you are doing and making

a tradeoff between using more CPU (processor) time and less hard disk stor-
age, or vice versa.

When you are giving a single command one time only, using a pipeline is
more efficient. When you want to give more than one command or want to
give one command repeatedly, it is more efficient to decompress the file once
using gunzip and then process it repeatedly with grep, sort, or uniq, assuming
you have sufficient disk space. The most inefficient technique as far as disk
space goes and the most efficient as far as CPU (and your) time goes is to
redirect the output of grep, sort, or uniq to new files:
$ zcat phone.gz | sort > phone.sort

Computer Science & Information Technology

You might also like to view...

What is the author’s recommended test plan?

a. Three users, once a month b. Five users at each major milestone c. Enough to provide statistical significance

Computer Science & Information Technology

The TDC method Reset is used for ________.

a) setting the recordset pointer to the beginning of the recordset b) setting the recordset pointer to the end of the recordset c) refreshing the display d) clearing the datasource

Computer Science & Information Technology

Using a resource pool allows you to schedule resources with consideration to resource allocations made in other projects.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

________ is the default program for opening CSV files.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology