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
sorry, forgot to keep the "mv" command in my last post.
for i in *.sh
do
n=`echo $i|sed 's/ /-/g'`
mv "$i" $n
done
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What does egrep mean?
What is bash shell command?
What language is shell scripting?
What does .sh file contain?
What is ms powershell?
What is the equivalent of a file shortcut that we have a window on a linux system?
How do I run a powershell script?
Is shell scripting a programming language?
What is scripting used for?
What is path variable bash?
What are the disadvantages of shell scripting?
How do we delete all blank lines in a file?
How do I run a shell script in powershell?
Where are cowrie shells found?
What is a shell script? Can you name some of its advantages?