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
Explain about login shell?
What is the equivalent of a file shortcut that we have a window on a linux system?
What is @echo off?
What are zombie processes?
How to get the 3rd element/column from each line from a file?
What does $1 mean in bash?
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.
Is shell script a programming language?
What is a scripting language simple definition?
what is info area how many types?
What is scripting used for?
What is console line?
How can I set the default rwx permission to all users on every file which is created in the current shell?
Explore about environment variables?
How many fields are present in a crontab file and what does each field specify?