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
Why is used in shell scripting?
What language is used in terminal?
How do I stop script errors?
How would you compare the strings in a shell script?
What is bash used for?
How do scripts work?
How do I open the shell prompt?
I have to write Shells (Linux + Unix)for publishing packages and reports. Is it possible ? What are the differents executable programs ineed to call ?
What makes c shell a more preferable option than the bourne shell?
how to print the matrix form of 2-d, 3-d arrays in unix c shell scripts ?
How do you know which shell I am using?
Calculate a real number calculation directly from the terminal and not any shell script.
How to find duplicate record in file using shell script?
What is awk in shell script?
Is bash an operating system?