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 does $$ mean in shell script?
How to get the first line from a file using just the terminal?
What language is bash written in?
What does $@ mean in shell?
What is bourne shell scripting?
one folder contains lot of students name but I want to fetch hello with every student name individually using shell script
What does .sh file contain?
What is computer cli?
What is option in shell script?
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.
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 path in shell script?
What is sh in shell script?
How to print all the arguments provided to the script?
How do I run a .sh file?