Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are filters explain sort with all the options available?

1304


How do scripts work?

1016


c program to implement unix/linux command to block the signal ctrl-c and ctrl-\ signal during the execution ls -l|wc -l

3728


How do I open the shell prompt?

1157


determine the output of the following command: echo ${new:-variable}

945


What is shell application?

971


What is a shell made of?

925


How do I set bash as default shell mac?

965


Determine the output of the following command: [ -z “” ] && echo 0 || echo 1

971


How to pass an argument to a script?

1134


Why is the use of shell script?

948


Is bash a shell script?

1026


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 ?

2113


How do I open a jshell in cmd?

1182


How do I run a powershell script?

1082