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
What is the first line in a shell script?
What is web script?
how to get part of string variable with echo command only?
What is an inode block?
What is inside a seashell?
What is eval in shell script?
What is bash used for?
What does .sh file contain?
What are the advantages of shell scripting?
is this growing field and what is average package in this?
What is difference between bash and shell?
How to find duplicate record in file using shell script?
How will you find the 99th line of a file using only tail and head command?
How can I send a mail with a compressed file as an attachment?
Explain about echo command?