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 / indusharma5

I tried following, but it doesn't work.
find . -name "*.sh" -0 -print0| xargs -n1 -I{} -0 sh -c '`mv {} echo "{}"|sed -n 's/ /-/g'`'

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the significance of the shebang line in shell scripting?

1071


What is the difference between scripting and coding?

996


What does egrep mean?

932


What is option in shell script?

976


What are scripts in psychology?

1016


Is powershell a bash?

1032


Is shell scripting easy to learn?

986


What is the command to find out users on the system?

938


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

4039


What is the fastest scripting language?

964


What is the use of a shebang line?

1138


Explain about the exit command?

946


What is scripting autism?

1179


How do I run a shell script on a mac?

1088


Write a shell script that adds two numbers if provided as the command line argument and if the two numbers are not entered throws an error message.

1249