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
Is shell script a programming language?
What does $0 mean in shell script?
How to open a read-only file in the shell?
How do I run a .sh file?
What does $@ mean in shell?
What is shift command in shell script?
What is path variable bash?
Write down the syntax for all the loops in shell scripting.
What is the syntax of "nested if statement" in shell scripting?
Explain about the exit command?
How to pass an argument to a script?
is this growing field and what is average package in this?
What is a scripting language simple definition?
What are the different communication commands available in the shell?
What is shell and terminal?