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 can you do with powershell?
What is shell chemistry?
What is the command to find out users on the system?
What is scripting used for?
What makes c shell a more preferable option than the bourne shell?
how will you find the total disk space used by a specific user?
Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.
Explain about return code?
write a shell script to generate a alert ? like when ur birthday came then generate a alert ur birthday is today like that ?
What is the fastest scripting language?
Print the 10th line without using tail and head command.
Why are there shells on the beach?
What are the default permissions of a file when it is created?
What is eval in shell script?
What is the difference between bash and shell?