Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

I have a directory called Project1 with 500 files called rock000.py, rock001.py, ... , rock500.py and I want to create a shell script (BASH) that

I have a directory called Project1 with 500 files called rock000.py, rock001.py, ... , rock500.py and I want to create a shell script (BASH) that will rename all these files in this particular directory. The script should take two arguments: a base name and a file extension. Can you please answer the SPECIFIC EXAMPLE below (i.e., add the base name, extension, and file names (old/new) in the code as I am new to Shell (Bash) hence I do not recognize base name and extention etc. well yet): 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

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle Database Architecture

Authors: Thomas Kyte, Darl Kuhn

3rd Edition

1430262990, 9781430262992

More Books

Students explore these related Databases questions

Question

13-6 How will MIS help my career?

Answered: 3 weeks ago