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 / manuswami
for file in `ls` ; do NEW=`echo $file | sed 's/.txt/.my/g'`
; mv $file $NEW ; done
| Is This Answer Correct ? | 10 Yes | 0 No |
Post New Answer View All Answers
What is eval in shell script?
How to check if the previous command was run successfully?
write a shell script to generate a alert ? like when ur birthday came then generate a alert ur birthday is today like that ?
Explain about debugging?
What is a file basename?
Rewrite the command to print the sentence and convert the variable to plural: echo “i like $variable”.
is this growing field and what is average package in this?
I have 2 files and I want to print the records which are common to both.
What happens on a system call?
What is shell and shell script?
How do I stop script errors?
How do you find out What is your shell?
Why is used in shell scripting?
What does $@ mean bash?
What is the use of .sh file?