Make sure that the program allows one or both of the files to be specified with filename substitution characters

Modify mycp to prompt for arguments if none are supplied. A typical execution of the modified version should look like this:
$ mycp
Source file name? voucher
Destination file name? voucher.sv
$


The only change required is to replace the arg number check conditional block with the following:
if [ "$#" -ne 2 ] ; then
echo "Source file name? \c" ; read from
echo "Destination file name? \c" ; read to
else
from="$1"
to="$2"
fi
Otherwise the program remains identical.

Computer Science & Information Technology

You might also like to view...

Given the following classes and code, what is the output of the last statement shown?

class Pet { public: virtual void print(); string name; private: }; class Dog: public Pet { public: void print(); string breed; }; void Pet::print() { cout << "My name is " << name; } void Dog::print() { Pet::print(); cout << ", and my breed is a "<< breed << endl; } Pet* pPtr; Dog* dPtr=new Dog; dPtr->name= "Rover"; dPtr->breed="Weiner"; pPtr= dPtr; pPtr->print(); a. My name is Rover, and my breed is a Weiner b. My name is Rover c. , and my breed is a Weiner d. nothing

Computer Science & Information Technology

Suppose that each database page contained the LSN of the commit record of the last transaction that has committed and written a database item in the page, and suppose that the system uses the policy that it does not flush the page from the cache until the LSN of the oldest record in the log buffer is greater than the LSN of the page. Will the write-ahead policy be enforced?

What will be an ideal response?

Computer Science & Information Technology

An endnote appears at the bottom of the page that contains the corresponding subscript number.

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

Computer Science & Information Technology

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

1. You can only use array indexed variables as arguments to methods. 2. A method can not change the values stored in the indexed variables of an array argument. 3. A collection class is a class whose objects store a collection of values. 4. You may cycle through elements of a collection object using a for loop. 5. In a vararg specification the ellipsis is not part of the Java syntax.

Computer Science & Information Technology