SlideShare a Scribd company logo
1 of 1
Download to read offline
The DOS Rename command allows file suffixes to be changed so that: ren cpp changes all files
with suffixes .c to the the name with suffix.cpp. So a c is renamed a cpp, b.c is renamed
b.ccp...for all files in the path Write a bash shell script that takes the destination path
(directory)dest as an optional parameter and renames all files in dest or current directory with old
extension to new extension. The format IS: proj3 dest] old extension new extension It should
query the user about each file before rename (y or n) skip if n (or no Example: Suppose files a c
b.c in the directory /dest A sample execution would be $proj3 ./dest c cpp rename a c? (y/n)y
rename b.c? (y/n) n finshed $ls dest should include a cpp b.c
Solution
else
echo "do not want to change"

More Related Content

More from formaxekochi

Why wont my code run I want to inherit everything from sailb.h cl.pdf
Why wont my code run I want to inherit everything from sailb.h cl.pdfWhy wont my code run I want to inherit everything from sailb.h cl.pdf
Why wont my code run I want to inherit everything from sailb.h cl.pdf
formaxekochi
 
What impact did Pythagoras have on EuclidSolutionPythagorasP.pdf
What impact did Pythagoras have on EuclidSolutionPythagorasP.pdfWhat impact did Pythagoras have on EuclidSolutionPythagorasP.pdf
What impact did Pythagoras have on EuclidSolutionPythagorasP.pdf
formaxekochi
 
Tic Tac Toe game with GUI please dont copy and paste from google. .pdf
Tic Tac Toe game with GUI please dont copy and paste from google. .pdfTic Tac Toe game with GUI please dont copy and paste from google. .pdf
Tic Tac Toe game with GUI please dont copy and paste from google. .pdf
formaxekochi
 
This is a U.S History questionThe 911 hijackers used fully-loade.pdf
This is a U.S History questionThe 911 hijackers used fully-loade.pdfThis is a U.S History questionThe 911 hijackers used fully-loade.pdf
This is a U.S History questionThe 911 hijackers used fully-loade.pdf
formaxekochi
 
5. A water sample with a total alkalinity of 2.00 x 10 molesL has .pdf
5. A water sample with a total alkalinity of 2.00 x 10 molesL has .pdf5. A water sample with a total alkalinity of 2.00 x 10 molesL has .pdf
5. A water sample with a total alkalinity of 2.00 x 10 molesL has .pdf
formaxekochi
 
21 Elucidate three different pathways for targeting proteins to the.pdf
21 Elucidate three different pathways for targeting proteins to the.pdf21 Elucidate three different pathways for targeting proteins to the.pdf
21 Elucidate three different pathways for targeting proteins to the.pdf
formaxekochi
 
Step 1 The Pair Class Many times in writing software we come across p.pdf
Step 1 The Pair Class Many times in writing software we come across p.pdfStep 1 The Pair Class Many times in writing software we come across p.pdf
Step 1 The Pair Class Many times in writing software we come across p.pdf
formaxekochi
 

More from formaxekochi (20)

What are this companys dividends per share for 2017Income State.pdf
What are this companys dividends per share for 2017Income State.pdfWhat are this companys dividends per share for 2017Income State.pdf
What are this companys dividends per share for 2017Income State.pdf
 
Why wont my code run I want to inherit everything from sailb.h cl.pdf
Why wont my code run I want to inherit everything from sailb.h cl.pdfWhy wont my code run I want to inherit everything from sailb.h cl.pdf
Why wont my code run I want to inherit everything from sailb.h cl.pdf
 
Which statement is trueA.The main goal of work teams is to share .pdf
Which statement is trueA.The main goal of work teams is to share .pdfWhich statement is trueA.The main goal of work teams is to share .pdf
Which statement is trueA.The main goal of work teams is to share .pdf
 
When developing a new software we should take into account how to cr.pdf
When developing a new software we should take into account how to cr.pdfWhen developing a new software we should take into account how to cr.pdf
When developing a new software we should take into account how to cr.pdf
 
What impact did Pythagoras have on EuclidSolutionPythagorasP.pdf
What impact did Pythagoras have on EuclidSolutionPythagorasP.pdfWhat impact did Pythagoras have on EuclidSolutionPythagorasP.pdf
What impact did Pythagoras have on EuclidSolutionPythagorasP.pdf
 
Tic Tac Toe game with GUI please dont copy and paste from google. .pdf
Tic Tac Toe game with GUI please dont copy and paste from google. .pdfTic Tac Toe game with GUI please dont copy and paste from google. .pdf
Tic Tac Toe game with GUI please dont copy and paste from google. .pdf
 
This is a U.S History questionThe 911 hijackers used fully-loade.pdf
This is a U.S History questionThe 911 hijackers used fully-loade.pdfThis is a U.S History questionThe 911 hijackers used fully-loade.pdf
This is a U.S History questionThe 911 hijackers used fully-loade.pdf
 
The PCAOB and SOX were created in 2002 and yet accounting frauds occ.pdf
The PCAOB and SOX were created in 2002 and yet accounting frauds occ.pdfThe PCAOB and SOX were created in 2002 and yet accounting frauds occ.pdf
The PCAOB and SOX were created in 2002 and yet accounting frauds occ.pdf
 
The main purpose of welfare is to provide incomes O A. for people who.pdf
The main purpose of welfare is to provide incomes O A. for people who.pdfThe main purpose of welfare is to provide incomes O A. for people who.pdf
The main purpose of welfare is to provide incomes O A. for people who.pdf
 
The following is the sample code for multithreading. Run it and expl.pdf
The following is the sample code for multithreading. Run it and expl.pdfThe following is the sample code for multithreading. Run it and expl.pdf
The following is the sample code for multithreading. Run it and expl.pdf
 
A quantity of HI was sealed in a tube, heated to 425C, and held at t.pdf
A quantity of HI was sealed in a tube, heated to 425C, and held at t.pdfA quantity of HI was sealed in a tube, heated to 425C, and held at t.pdf
A quantity of HI was sealed in a tube, heated to 425C, and held at t.pdf
 
a higher GDP means that the U.S. either produced more goods and serv.pdf
a higher GDP means that the U.S. either produced more goods and serv.pdfa higher GDP means that the U.S. either produced more goods and serv.pdf
a higher GDP means that the U.S. either produced more goods and serv.pdf
 
All EXCEPT which of the following are stages of mitosis a) S ph.pdf
All EXCEPT which of the following are stages of mitosis  a) S ph.pdfAll EXCEPT which of the following are stages of mitosis  a) S ph.pdf
All EXCEPT which of the following are stages of mitosis a) S ph.pdf
 
5. A water sample with a total alkalinity of 2.00 x 10 molesL has .pdf
5. A water sample with a total alkalinity of 2.00 x 10 molesL has .pdf5. A water sample with a total alkalinity of 2.00 x 10 molesL has .pdf
5. A water sample with a total alkalinity of 2.00 x 10 molesL has .pdf
 
21 Elucidate three different pathways for targeting proteins to the.pdf
21 Elucidate three different pathways for targeting proteins to the.pdf21 Elucidate three different pathways for targeting proteins to the.pdf
21 Elucidate three different pathways for targeting proteins to the.pdf
 
Systematic Sampling Technique is used to select 5 numbers between 1 .pdf
Systematic Sampling Technique is used to select 5 numbers between 1 .pdfSystematic Sampling Technique is used to select 5 numbers between 1 .pdf
Systematic Sampling Technique is used to select 5 numbers between 1 .pdf
 
Summarize the process by which organizations change their cultures. .pdf
Summarize the process by which organizations change their cultures. .pdfSummarize the process by which organizations change their cultures. .pdf
Summarize the process by which organizations change their cultures. .pdf
 
Step 1 The Pair Class Many times in writing software we come across p.pdf
Step 1 The Pair Class Many times in writing software we come across p.pdfStep 1 The Pair Class Many times in writing software we come across p.pdf
Step 1 The Pair Class Many times in writing software we come across p.pdf
 
Sort the following formulas or structures as carboxylic acids, ester.pdf
Sort the following formulas or structures as carboxylic acids, ester.pdfSort the following formulas or structures as carboxylic acids, ester.pdf
Sort the following formulas or structures as carboxylic acids, ester.pdf
 
Please help me to solve this DEs question 7. Express the general s.pdf
Please help me to solve this DEs question  7. Express the general s.pdfPlease help me to solve this DEs question  7. Express the general s.pdf
Please help me to solve this DEs question 7. Express the general s.pdf
 

Recently uploaded

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 

Recently uploaded (20)

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 

The DOS Rename command allows file suffixes to be changed so that re.pdf

  • 1. The DOS Rename command allows file suffixes to be changed so that: ren cpp changes all files with suffixes .c to the the name with suffix.cpp. So a c is renamed a cpp, b.c is renamed b.ccp...for all files in the path Write a bash shell script that takes the destination path (directory)dest as an optional parameter and renames all files in dest or current directory with old extension to new extension. The format IS: proj3 dest] old extension new extension It should query the user about each file before rename (y or n) skip if n (or no Example: Suppose files a c b.c in the directory /dest A sample execution would be $proj3 ./dest c cpp rename a c? (y/n)y rename b.c? (y/n) n finshed $ls dest should include a cpp b.c Solution else echo "do not want to change"