Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a shell script that will rename all the files in a directory. The first argument is a base name, second argument is a file
Write a shell script that will rename all the files in a directory. The first argument is a base name, second argument is a file extension. If the script is run as: $ renumber 25thAnniversary jpeg then the resulting files should have names like: 25thAnniversary001.jpeg, 25thAnniversary002.jpeg, 25thAnniversary003.jpeg, etc.
Before renaming a file, make sure that a file with the new name does not already exist. If one does, handle the exception appropriately.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started