Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Write a script to print the first 10 elements of fibonacci series.

2409


What is difference between bash and shell?

1175


What language is used in terminal?

1029


What is bash coding?

974


How does ls command work?

1080


How to set an array in linux?

1315


What is meant by dos operating system?

1114


Is cmd a shell?

1075


What is awk in shell scripting?

1074


Explain about debugging?

1078


How does shell scripting work?

1173


What is shell and shell script?

1159


Where is bash history?

990


What is meant by $1 in shell script?

997


How to print all array elements and their respective indexes?

1020