Question
Given a directory called Project1 with 500 files called rock000.py, rock001.py, ... , rock500.py, create a bash shell script that will rename all the files
Given a directory called Project1 with 500 files called rock000.py, rock001.py, ... , rock500.py, create a bash shell script that will rename all the files given in this directory. The script should take two arguments: a base name and a file extension. Please include the specifics from the example in the code (i.e., identify the base name, extension, and old and new file names and write them as part of the code). If we run bash project.sh project_rocks py the resulting files in the directory should be like this: project_rocks000.py, project_rocks001.py, .. , project_rocks500.py.
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