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

How will you connect to a database server from linux?

992


What is awk in shell script?

1174


What is console line?

924


how to get part of string variable with echo command only?

975


I want to connect to a remote server and execute some commands, how can I achieve this?

975


How many fields are present in a crontab file and what does each field specify?

1061


Is shell scripting difficult?

896


How to redirect both standard output and standard error to the same location?

1112


How can we find the process name from its process id?

1128


How can you get the value of pi till a 100 decimal places?

921


Is shell scripting useful?

999


How do I open the shell prompt?

1139


What are the four fundamental components of every file system on linux?

1623


How do I open the shell in cmd?

1049


What is a shell script in windows?

1026