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

Is shell script a programming language?

1040


What does $0 mean in shell script?

1017


How to open a read-only file in the shell?

1135


How do I run a .sh file?

1028


What does $@ mean in shell?

1049


What is shift command in shell script?

1047


What is path variable bash?

1054


Write down the syntax for all the loops in shell scripting.

1154


What is the syntax of "nested if statement" in shell scripting?

1105


Explain about the exit command?

994


How to pass an argument to a script?

1217


is this growing field and what is average package in this?

2309


What is a scripting language simple definition?

1109


What are the different communication commands available in the shell?

977


What is shell and terminal?

1014