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
I want to create a directory such that anyone in the group can create a file and access any person's file in it but none should be able to delete a file other than the one created by himself.
I want to connect to a remote server and execute some commands, how can I achieve this?
What are the two files of crontab command?
What is the difference between grep and egrep?
How do you debug a script?
What is echo $shell?
What does egrep mean?
What is scripting autism?
What is the use of break command?
What language is shell scripting?
Explain about non-login shell files?
What is shell company all about?
what is info area how many types?
What is the use of a shebang line?
What is the use of echo in shell script?