Question: Write a Bash script called mymv ( which replaces the GNU utility mv ) that tries to rename the specified file ( using the GNU
Write a Bash script called mymv 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. So if I type:
$ mymv atxt btxt
but btxt already exists, mymv will move the file to btxt Note that if btxt already exists, you must rename the file to btxt and so on until you can successfully rename the file to a name that does not already exist.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
