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
What are the default permissions of a file when it is created?
How to get script name inside a script?
Why is a script important?
What is bourne shell scripting?
What is the lifespan of a variable inside a shell script?
Explain about "s" permission bit in a file?
What is path in shell script?
What is meant by dos operating system?
What happens when you type ls?
How to pass an argument to a script?
Explain about shebang?
What happens on a system call?
Explain about the slow execution speed of shells?
What does it mean to debug a script?
What is gui scripting?