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 filters explain sort with all the options available?
How do scripts work?
c program to implement unix/linux command to block the signal ctrl-c and ctrl-\ signal during the execution ls -l|wc -l
How do I open the shell prompt?
determine the output of the following command: echo ${new:-variable}
What is shell application?
What is a shell made of?
How do I set bash as default shell mac?
Determine the output of the following command: [ -z “” ] && echo 0 || echo 1
How to pass an argument to a script?
Why is the use of shell script?
Is bash a shell script?
Set up a Sev 2 alert when the Primary WA service fails. A windows batch script needs to be created that will monitor the WA service on the Primary and when the service stops/fails a Sev 2 TT is generated for a particular team ?
How do I open a jshell in cmd?
How do I run a powershell script?