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
Write a script to print the first 10 elements of fibonacci series.
What is difference between bash and shell?
What language is used in terminal?
What is bash coding?
How does ls command work?
How to set an array in linux?
What is meant by dos operating system?
Is cmd a shell?
What is awk in shell scripting?
Explain about debugging?
How does shell scripting work?
What is shell and shell script?
Where is bash history?
What is meant by $1 in shell script?
How to print all array elements and their respective indexes?