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
What is a boot block?
What will happen to my current process when I execute a command using exec?
Explain about debugging?
What's the difference between scripting and coding?
What does egrep mean?
What are script files?
In my bash shell I want my prompt to be of format '$"present working directory":"hostname"> and load a file containing a list of user-defined functions as soon as I log in, how will you automate this?
What is ms powershell?
What does echo $0 do?
What is a scripting language simple definition?
What is a command line shell?
one folder contains lot of students name but I want to fetch hello with every student name individually using shell script
How to pass an argument to a script?
wats the deinitions for shell utility and filter?
What language is shell scripting?