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 the advantages of using shell scripts?

1053


How will you find the 99th line of a file using only tail and head command?

2526


What is shell scripting used for?

982


Explain about the slow execution speed of shells?

1207


What is batch file programming?

1147


How to get the first line from a file using just the terminal?

1104


Is bash an operating system?

969


how to print the matrix form of 2-d, 3-d arrays in unix c shell scripts ?

4061


Is shell scripting difficult?

933


What does chmod do?

1158


How are shells born?

952


How to print the first array element?

1023


How do you find out What is your shell?

1045


What is path in shell script?

1071


Determine the output of the following command: name=shubham && echo ‘my name is $name’.

975