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
How do I stop script errors?
Why are there shells on the beach?
How can we find the process name from its process id?
What is k shell?
What makes c shell a more preferable option than the bourne shell?
What shell is bin sh?
What is the first line in every perl script called?
What is the use of .sh file?
What does $@ mean bash?
What is the syntax of while loop in shell scripting?
What can scripts do?
How will you emulate wc –l using awk?
c program which behaves like a shell(command interpreter). it has its own prompt say "NewShell$".any normal shell command is executed from your shell by starting a child process to execute a system program corrosponding to the command
How will you connect to a database server from linux?
Can we run shell script in windows?