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 exactly is a shell?
What is ms powershell?
What is shell environment?
What are the various stages of a linux process it passes through?
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
What is awk script?
What is a shell made of?
State the advantages of shell scripting?
What is shell company all about?
Explain about shebang?
What is a shell? · Types of shell · what is shell scripting?
Give some situations where typing error can destroy a program?
What is the conditional statement in shell scripting?
Devise a script that takes file name as arguement(which must present in the current directory)and locates from your home directory tree all thpath names of its links.Then mail the list to self.
Is shell a part of kernel?