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 / asit pal
foreach x (`ls *.txt')
set y = `echo $x | cut -d . -f 1`
mv y y.my
done
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How will you connect to a database server from linux?
What is awk in shell script?
What is console line?
how to get part of string variable with echo command only?
I want to connect to a remote server and execute some commands, how can I achieve this?
How many fields are present in a crontab file and what does each field specify?
Is shell scripting difficult?
How to redirect both standard output and standard error to the same location?
How can we find the process name from its process id?
How can you get the value of pi till a 100 decimal places?
Is shell scripting useful?
How do I open the shell prompt?
What are the four fundamental components of every file system on linux?
How do I open the shell in cmd?
What is a shell script in windows?