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 is a shell script in windows?
Tell something about the super block in shell scripting?
What lives in a shell?
How do I open the shell prompt?
What is a program shell?
How to open a read-only file in the shell?
Hello all, This is my assignment on shell scripting, can anyone help me regarding this ? Create a shell script which connects to the database In second shell script include the first script for the DB connection Create a table (PRADEEP_DATA) with 2 columns (name, value) In Third shell script include the first script for the DB connection And insert/delete the values from the Table, by accepting input from the user This functionality should be a menu driven Program: 1) Insert to the database a. Name b. value 2)Delete from the database a.Name b.value Exception handling needs to be taken care.
What is the default ubuntu terminal?
What are the different types of variables used in shell script?
What is bash coding?
What is the fastest scripting language?
How do I start a shell script?
What is .sh file in mac?
How do I save a powershell script?
What is echo in shell?