How u convert string "hi pravin how are you?" to
"Hi Pravin How Are You?"
Answer Posted / vipul dalwala
echo "hi pravin how are you?" | awk 'BEGIN { ORS = ""
upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
lower = "abcdefghijklmnopqrstuvwxyz" }
{
for (i = 1; i <= NF; i++) {
FC = substr($i, 1, 1)
if (C = index(lower, FC))
FC = substr(upper, C, 1)
print FC substr($i,2) " "
}
print "\n"
}'
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
How can I set the default rwx permission to all users on every file which is created in the current shell?
Is cmd a shell?
i have 2 tables 4 colums table 1 respective values a1 6, a2 8,a3 9,a4 14 & table 2 respective values a1 6, a2 8, a3 9, a4 12. if compare 2 tables 3 colums values same then 4th column values 1)Qes diff >5 then (5 * diff value ) 2)Qes diff <5 the 5 3)Qes diff 5 then 5 print respective values..
What are script files?
Calculate a real number calculation directly from the terminal and not any shell script.
What is bash shell command?
What are the different variables present in linux shell?
determine the output of the following command: echo ${new:-variable}
How would you compare the strings in a shell script?
Differentiate between ‘ and ” quotes.
Write a shell script to get current date, time, user name and current working directory.
What does sh mean?
What is computer cli?
How does ls command work?
What is path in shell script?