Write a Bash script called mv (which replaces the GNU utility mv) that tries to rename the specified file (using the GNU utility mv), but if the destination file exists, instead creates an index number to append to the destination file, a sort of version number. (example omitted)

What will be an ideal response?


You will need to create a variable for this quasi-version number, increment it, create a new
filename with it, and test to see if the name exists. If it does, increment the counter and do it again.
When a name is found that doesn’t exist, use that name.

Computer Science & Information Technology

You might also like to view...

Clicking the Save As button automatically stores a file using the original name, drive, and folder where it was previously stored.

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

Computer Science & Information Technology

The ________ form control in Visual Basic allows the user to select a range in a worksheet when a button is clicked

A) TabStrip B) CommandButton C) RefEdit D) SpinButton

Computer Science & Information Technology

The lack of ________ and the removal of traditional jurisdictional demarcations allow perpetrators to commit multinational crime with little fear

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

Computer Science & Information Technology

Case 2-2Lucia is editing a program using Java. She has to install a development environment on her computer before she can get started.Lucia considers using the ____ development environment, which has the most widespread use.

A. JGrasp B. Notepad C. DOS D. UNIX

Computer Science & Information Technology