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 do you rename the files(*.sh) with file names containing space in it?for example "interview question.sh" needs to rename to "interview-question.sh".
Appreciate your inputs.Thanks.

Answer Posted / chetan

for i in *.sh
do
echo $i|sed 's/ /-/g'
done

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the default permissions of a file when it is created?

980


How to get script name inside a script?

981


Why is a script important?

1009


What is bourne shell scripting?

938


What is the lifespan of a variable inside a shell script?

1599


Explain about "s" permission bit in a file?

1018


What is path in shell script?

1055


What is meant by dos operating system?

1016


What happens when you type ls?

960


How to pass an argument to a script?

1134


Explain about shebang?

1010


What happens on a system call?

969


Explain about the slow execution speed of shells?

1188


What does it mean to debug a script?

1012


What is gui scripting?

1053