Enter the following script named savefiles, and give yourself execute permission to the file:





a. Which error message do you receive when you execute this script?

Rewrite the script so that the error does not occur, making sure the output

still goes to savethem.

b. What might be a problem with running this script twice in the same

directory? Discuss a solution to this problem.


a. You receive the following error message:
cat: savethem: input file is output file
b. Each time you run savefiles, it overwrites the savethem file with the cur-
rent contents of the working directory. When you remove a file and run
savefiles again, that file will no longer be in savethem. If you want to keep
an archive of files in the working directory, you need to save the files to
a new file each time you run savefiles. If you prefix the filename savethem
with $$, you will have a unique filename each time you run savefiles.

Computer Science & Information Technology

You might also like to view...

The non-leaf root of a B-tree of order m has a minimum of how many children?

a) 0 b) 1 c) 2 d) m/2 e) None of these is correct

Computer Science & Information Technology

The ____ filters redraw an image or selection by joining, grouping, or clustering pixels of similar color values into cells defined by the tolerance settings.

a. Blur b. Distort c. Sketch d. Pixelate

Computer Science & Information Technology

What strategy does the hashing implementation of a dictionary use?

A. a binary search tree B. quadratic probing C. linear probing/bucket D. bucket/chaining

Computer Science & Information Technology

____ operations provide the computing agent with data values from the outside world that it may use in later instructions.

A. Ingoing B. Outgoing C. Input D. Output

Computer Science & Information Technology