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
What are the advantages of using shell scripts?
How will you find the 99th line of a file using only tail and head command?
What is shell scripting used for?
Explain about the slow execution speed of shells?
What is batch file programming?
How to get the first line from a file using just the terminal?
Is bash an operating system?
how to print the matrix form of 2-d, 3-d arrays in unix c shell scripts ?
Is shell scripting difficult?
What does chmod do?
How are shells born?
How to print the first array element?
How do you find out What is your shell?
What is path in shell script?
Determine the output of the following command: name=shubham && echo ‘my name is $name’.