How to rename all the files in a folder having specific
extension?
Example: I have some files with extension (.txt) in a folder
name 'Test'. I have to rename all the .txt files in a test
and its subdirectories to .my extension.
Answer Posted / sushanta
for i in *
do
p=`basename $i c`
q=$p "txt"
mv $i $q
done
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is wc in shell script?
What does sh mean?
What is @echo off?
What is shell geeksforgeeks?
What are filters explain sort with all the options available?
What is an sh file?
How do I save a powershell script?
madhar chod unix ke 10 commands dhang se likh nahi sakta hai
How do I run a bin bash script?
What is the syntax of "nested if statement" in shell scripting?
What is the best scripting language?
Explain how you Automate your application using Shell scripting.
What's the difference between scripting and coding?
What is subshell?
Write down the syntax of "for " loop